Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fix verbose-bit-mask example (#14055)
changelog: none `x & 15 == 0` is not equivalent to `x.trailing_zeros() > 4`, as `x = 0b10000` is true for the former and false for the latter. In fact, clippy itself suggests the following: ```rust pub fn src(x: i32) -> bool { x & 15 == 0 // ~error: bit mask could be simplified with a call to `trailing_zeros` ^^^^^^^^^^^ help: try: `x.trailing_zeros() >= 4` } ```
- Loading branch information