Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarler committed Aug 13, 2024
1 parent 8570d8a commit 04a386f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ fn value_is_power_of_two(s: &str) -> Result<usize, String> {
fn is_power_of_two(v: usize) -> bool {
// NOTE: Neither 0 nor 1 are a power of 2 (ignoring 2^0 for this use case),
// so rule them out
if (v != 0) && (v != 1) && ((v & (v - 1)) == 0) {
true
} else {
false
}
(v != 0) && (v != 1) && ((v & (v - 1)) == 0)
}

/// Given a non-prime unsigned int, return the prime number that precedes it
Expand Down

0 comments on commit 04a386f

Please sign in to comment.