We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cc8ef6 commit 8e8f542Copy full SHA for 8e8f542
ciborium/src/value/mod.rs
@@ -500,7 +500,7 @@ impl From<u128> for Value {
500
}
501
502
let mut bytes = &value.to_be_bytes()[..];
503
- while !bytes.is_empty() && bytes[0] == 0 {
+ while let Some(0) = bytes.get(0) {
504
bytes = &bytes[1..];
505
506
@@ -521,7 +521,7 @@ impl From<i128> for Value {
521
};
522
523
let mut bytes = &raw.to_be_bytes()[..];
524
525
526
527
0 commit comments