Commit 4b9a172
repr: Remove unnecessary parse_uuid guard against a nonexistent uuid panic
`strconv::parse_uuid` (#36984) rejected inputs shorter than 32 chars or
non-ASCII before handing them to the `uuid` crate, on the premise that
`Uuid::parse_str` panics (rather than erroring) while building its parse error
for some malformed inputs by slicing on a non-char boundary. That premise is
false for the version we lock (uuid 1.19.0) and for every release back to
0.8.2: `Uuid::parse_str` returns a clean `Err` for all such inputs (`{}`,
`{\0}`, non-ASCII, etc.). `InvalidUuid::into_err` rejects non-UTF8 up front,
strips the `{}`/`urn:uuid:` wrappers on raw bytes (always standalone ASCII, so
char-safe), and its one subtraction can't underflow.
So the guard only suppressed the `uuid` crate's own (more detailed) error
message for short/non-ASCII input, and the `value_decode_text` regression test
asserted an invariant the crate already upholds. No saved cargo-fuzz artifact
reaches a uuid panic. Restore the original parser and drop the vacuous test.
Mirrors removing the equivalent persist `parse_id`/`ShardId::from_str` guard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 00d8a22 commit 4b9a172
2 files changed
Lines changed: 6 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
| 734 | + | |
743 | 735 | | |
744 | 736 | | |
745 | 737 | | |
| |||
2206 | 2198 | | |
2207 | 2199 | | |
2208 | 2200 | | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | | - | |
2223 | | - | |
2224 | 2201 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | 821 | | |
826 | 822 | | |
827 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| |||
0 commit comments