Improve "Why this is bad" section
Co-authored-by: Ruby Lazuli <general@patchmixolydic.com>
This commit is contained in:
parent
d7996da9da
commit
5515566829
@ -13,7 +13,7 @@
|
||||
/// Checks for expressions like `x.count_ones() == 1` or `x & (x - 1) == 0` which are manual
|
||||
/// reimplementations of `x.is_power_of_two()``
|
||||
/// ### Why is this bad?
|
||||
/// It's simpler and clearer
|
||||
/// Manual reimplementations of `is_power_of_two` increase code complexity for little benefit.
|
||||
/// ### Example
|
||||
/// ```no_run
|
||||
/// let x: u32 = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user