-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
beans-rs fails to parse keys for the versions and patches dictionaries/hashmaps in the remote bullseye file into a usize when it has leading zeroes (like: 074).
This can easily be reproduced by having any key in the versions or patches hashmap/dictionary with leading zeros.
{
"versions": {
"074": {
"file": "pf2-0.7.4.tar.zst",
"presz": 3553518945,
"postsz": 6512259072,
"signature": "pf2-0.7.4.sig",
"heal": "pf2-0.7.4-heal.zip"
}
}
}Writing a fix like the following steps should fix this issue:
- Parse into HashMap<String, TValue>
- Trim any
0at start of key - Parse key as
usize - Return new hashmap with type
HashMap<usize, TValue>
Returning an error when a number has leading zeros is intended in serde, which is annoying.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working