Skip to content

Commit

Permalink
perf: small optimization !iter.all => iter.any!
Browse files Browse the repository at this point in the history
  • Loading branch information
sehnryr committed Feb 26, 2025
1 parent 20aa65a commit 4ff0c52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5906,7 +5906,8 @@ pub(crate) mod utils {

// Check that the suffix starts with '@' and is all ASCII decimals
// after that.
if suffix[0] != b'@' || !suffix[1..].iter().all(u8::is_ascii_digit)
if suffix[0] != b'@' ||
suffix[1..].iter().any(|&c| !c.is_ascii_digit())
{
return false;
}
Expand Down

0 comments on commit 4ff0c52

Please sign in to comment.