Skip to content

Commit

Permalink
Fix checked_conversions lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Jan 9, 2025
1 parent 59a43e1 commit 22fe478
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
checked_conversions = "allow"
default_trait_access = "allow"
explicit_into_iter_loop = "allow"
flat_map_option = "allow"
Expand Down
5 changes: 1 addition & 4 deletions bindgen/ir/var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,7 @@ impl ClangSubItemParser for Var {
assert_eq!(c.len_utf8(), 1);
c as u8
}
CChar::Raw(c) => {
assert!(c <= u64::from(u8::MAX));
c as u8
}
CChar::Raw(c) => u8::try_from(c).unwrap(),
};

(TypeKind::Int(IntKind::U8), VarType::Char(c))
Expand Down

0 comments on commit 22fe478

Please sign in to comment.