Skip to content

F05-NEW-AF-01: fix panic on signed precision values in enum_val_to_ord - #2

Open
dcorral wants to merge 2 commits into
mainfrom
task/20260917-af01-signed-precision-panic
Open

dcorral wants to merge 2 commits into
mainfrom
task/20260917-af01-signed-precision-panic

Conversation

@dcorral

@dcorral dcorral commented Sep 17, 2026

Copy link
Copy Markdown

enum_val_to_ord read GS_PRECISION by calling unwrap_uint on any StrictVal::Number, which panics on a signed or negative value instead of returning None.

The match now takes only StrictNum::Uint. Every other numeric variant falls through to the existing _ => None, the same path an unrecognised enum variant already takes.

No signature change: the function already returns Option<u8>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant