We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 149fc76 + 515978d commit 3697121Copy full SHA for 3697121
src/libstd/num/int_macros.rs
@@ -308,7 +308,7 @@ impl Integer for $T {
308
309
/// Returns `true` if the number is divisible by `2`
310
#[inline]
311
- fn is_even(&self) -> bool { self.is_multiple_of(&2) }
+ fn is_even(&self) -> bool { self & 1 == 0 }
312
313
/// Returns `true` if the number is not divisible by `2`
314
src/libstd/num/uint_macros.rs
@@ -169,7 +169,7 @@ impl Integer for $T {
169
170
171
172
173
174
175
0 commit comments