Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4ff0c52

Browse files
committedFeb 26, 2025
perf: small optimization !iter.all => iter.any!
1 parent 20aa65a commit 4ff0c52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎bindgen/codegen/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5906,7 +5906,8 @@ pub(crate) mod utils {
59065906

59075907
// Check that the suffix starts with '@' and is all ASCII decimals
59085908
// after that.
5909-
if suffix[0] != b'@' || !suffix[1..].iter().all(u8::is_ascii_digit)
5909+
if suffix[0] != b'@' ||
5910+
suffix[1..].iter().any(|&c| !c.is_ascii_digit())
59105911
{
59115912
return false;
59125913
}

0 commit comments

Comments
 (0)
Please sign in to comment.