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 5130441 commit 53f5610Copy full SHA for 53f5610
Cargo.toml
@@ -54,7 +54,7 @@ cast_possible_wrap = "allow"
54
cast_sign_loss = "allow"
55
# Exhaustive list of pedantic clippy lints
56
assigning_clones = "warn"
57
-bool_to_int_with_if = "allow"
+bool_to_int_with_if = "warn"
58
borrow_as_ptr = "warn"
59
case_sensitive_file_extension_comparisons = "warn"
60
cast_lossless = "allow"
src/value.rs
@@ -155,7 +155,7 @@ impl UIntValue {
155
let mut byte = 0u8;
156
for _ in 0..8 {
157
let bit = padded_bits.next().unwrap();
158
- byte = (byte << 1) | if bit == '1' { 1 } else { 0 };
+ byte = (byte << 1) | u8::from(bit == '1');
159
}
160
bytes.push(byte);
161
0 commit comments