From c3ac4fb1e600e0631d60e51d11dc0e68513b270a Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Sat, 4 Jan 2025 11:06:25 +0900 Subject: [PATCH] fmt --- library/core/src/convert/num.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 209ae5a9de270..21234b4a33324 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -614,8 +614,8 @@ mod verify { #[kani::proof] pub fn $harness_pass() { let x_inner: $source = kani::any_where(|&v| { - (v > 0 && (v as u128) <= (<$target>::MAX as u128)) || - (v < 0 && (v as i128) >= (<$target>::MIN as i128)) + (v > 0 && (v as u128) <= (<$target>::MAX as u128)) + || (v < 0 && (v as i128) >= (<$target>::MIN as i128)) }); let x = NonZero::new(x_inner).unwrap(); let _ = NonZero::<$target>::try_from(x).unwrap(); @@ -625,8 +625,8 @@ mod verify { #[kani::should_panic] pub fn $harness_panic() { let x_inner: $source = kani::any_where(|&v| { - (v > 0 && (v as u128) > (<$target>::MAX as u128)) || - (v < 0 && (v as i128) < (<$target>::MIN as i128)) + (v > 0 && (v as u128) > (<$target>::MAX as u128)) + || (v < 0 && (v as i128) < (<$target>::MIN as i128)) }); let x = NonZero::new(x_inner).unwrap(); let _ = NonZero::<$target>::try_from(x).unwrap(); @@ -635,10 +635,10 @@ mod verify { ($source:ty => $target:ty, $harness_infallible:ident,) => { #[kani::proof] pub fn $harness_infallible() { - let x: NonZero::<$source> = kani::any(); + let x: NonZero<$source> = kani::any(); let _ = NonZero::<$target>::try_from(x).unwrap(); } - } + }; } // unsigned non-zero integer -> unsigned non-zero integer fallible