Skip to content

Commit

Permalink
Update bindgen/clang.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus authored Feb 20, 2024
1 parent 90df906 commit 2cb2c6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindgen/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ impl Type {
pub(crate) fn num_elements(&self) -> Option<usize> {
let n = unsafe { clang_getNumElements(self.x) };
if n >= 0 {
Some(n.try_into().expect("array size does not fit in `usize`"))
Some(n.try_into().unwrap())
} else {
debug_assert_eq!(n, -1);
None
Expand Down

0 comments on commit 2cb2c6b

Please sign in to comment.