We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
checked_conversions
1 parent 2effeef commit 2974d7cCopy full SHA for 2974d7c
Cargo.toml
@@ -57,7 +57,6 @@ cast_possible_truncation = "allow"
57
cast_possible_wrap = "allow"
58
cast_precision_loss = "allow"
59
cast_sign_loss = "allow"
60
-checked_conversions = "allow"
61
default_trait_access = "allow"
62
explicit_into_iter_loop = "allow"
63
flat_map_option = "allow"
bindgen/ir/var.rs
@@ -234,10 +234,7 @@ impl ClangSubItemParser for Var {
234
assert_eq!(c.len_utf8(), 1);
235
c as u8
236
}
237
- CChar::Raw(c) => {
238
- assert!(c <= u64::from(u8::MAX));
239
- c as u8
240
- }
+ CChar::Raw(c) => u8::try_from(c).unwrap(),
241
};
242
243
(TypeKind::Int(IntKind::U8), VarType::Char(c))
0 commit comments