From 7903f731bacf25d52e438f8a747a5dc5d497b1ad Mon Sep 17 00:00:00 2001 From: Nia Espera Date: Sat, 10 Dec 2022 15:19:10 +0100 Subject: [PATCH] fmt --- src/bin/miri.rs | 7 ++++++- tests/pass-dep/page_size.rs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/bin/miri.rs b/src/bin/miri.rs index 08f1c868ae..8c01748613 100644 --- a/src/bin/miri.rs +++ b/src/bin/miri.rs @@ -514,7 +514,12 @@ fn main() { miri_config.num_cpus = num_cpus; } else if let Some(param) = arg.strip_prefix("-Zmiri-force-page-size=") { let page_size = match param.parse::() { - Ok(i) => if i.is_power_of_two() { i * 1024 } else { show_error!("-Zmiri-force-page-size requires a power of 2: {}", i) }, + Ok(i) => + if i.is_power_of_two() { + i * 1024 + } else { + show_error!("-Zmiri-force-page-size requires a power of 2: {}", i) + }, Err(err) => show_error!("-Zmiri-force-page-size requires a `u64`: {}", err), }; diff --git a/tests/pass-dep/page_size.rs b/tests/pass-dep/page_size.rs index b8902bbb56..fb06031753 100644 --- a/tests/pass-dep/page_size.rs +++ b/tests/pass-dep/page_size.rs @@ -4,7 +4,11 @@ fn main() { // In particular, this checks that it is not 0. assert!(page_size.is_power_of_two(), "page size not a power of two: {}", page_size); // Most architectures have 4k pages by default - #[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64", all(target_arch = "aarch64", target_vendor = "apple"))))] + #[cfg(not(any( + target_arch = "wasm32", + target_arch = "wasm64", + all(target_arch = "aarch64", target_vendor = "apple") + )))] assert!(page_size == 4 * 1024, "non-4k default page size: {}", page_size); // ... except aarch64-apple with 16k #[cfg(all(target_arch = "aarch64", target_vendor = "apple"))]