We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bebdbd commit 515978dCopy full SHA for 515978d
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