]> git.lizzy.rs Git - rust.git/commitdiff
use is_power_of_two where appropriate
authorRalf Jung <post@ralfj.de>
Mon, 30 May 2022 21:47:16 +0000 (17:47 -0400)
committerRalf Jung <post@ralfj.de>
Mon, 30 May 2022 21:47:16 +0000 (17:47 -0400)
test-cargo-miri/tests/test.rs

index 1a8b3c72565d31b65ad42f7977bb788bca2b3167..545c79db2760b06bda93b6cc74e661b5e9822d14 100644 (file)
@@ -68,7 +68,7 @@ fn page_size() {
 
     // In particular, this checks that it is not 0.
     assert!(
-        page_size.next_power_of_two() == page_size,
+        page_size.is_power_of_two(),
         "page size not a power of two: {}",
         page_size
     );