Skip to content

Commit 63b785d

Browse files
committed
Fix checked_conversions lint
1 parent 59a43e1 commit 63b785d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ cast_possible_truncation = "allow"
5757
cast_possible_wrap = "allow"
5858
cast_precision_loss = "allow"
5959
cast_sign_loss = "allow"
60-
checked_conversions = "allow"
6160
default_trait_access = "allow"
6261
explicit_into_iter_loop = "allow"
6362
flat_map_option = "allow"

bindgen/ir/var.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ impl ClangSubItemParser for Var {
235235
c as u8
236236
}
237237
CChar::Raw(c) => {
238-
assert!(c <= u64::from(u8::MAX));
239-
c as u8
238+
u8::try_from(c).unwrap()
240239
}
241240
};
242241

0 commit comments

Comments
 (0)