Skip to content

Commit

Permalink
Fix useless conversions.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jun 17, 2023
1 parent 00e9d47 commit 31dcb00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bindgen/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,10 +2269,12 @@ impl EvalResult {

if unsafe { clang_EvalResult_isUnsignedInt(self.x) } != 0 {
let value = unsafe { clang_EvalResult_getAsUnsigned(self.x) };
#[allow(clippy::useless_conversion)]
return value.try_into().ok();
}

let value = unsafe { clang_EvalResult_getAsLongLong(self.x) };
#[allow(clippy::useless_conversion)]
value.try_into().ok()
}

Expand Down

0 comments on commit 31dcb00

Please sign in to comment.