From 607046d7fea3afa35fe775ed552822c28aeb5891 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 16 Feb 2023 16:42:24 +0100 Subject: [PATCH] Tweaked Rust code to avoid unused parentheses warning. --- rust-no-heap/src/lib.rs | 4 ++-- rust/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust-no-heap/src/lib.rs b/rust-no-heap/src/lib.rs index b595fcc..88890a0 100644 --- a/rust-no-heap/src/lib.rs +++ b/rust-no-heap/src/lib.rs @@ -965,8 +965,8 @@ impl FinderPenalty { let n = rh[1]; debug_assert!(n <= self.qr_size * 3); let core = n > 0 && rh[2] == n && rh[3] == n * 3 && rh[4] == n && rh[5] == n; - ( i32::from(core && rh[0] >= n * 4 && rh[6] >= n) - + i32::from(core && rh[6] >= n * 4 && rh[0] >= n)) + i32::from(core && rh[0] >= n * 4 && rh[6] >= n) + + i32::from(core && rh[6] >= n * 4 && rh[0] >= n) } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 5f26b25..0dc44f8 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -839,8 +839,8 @@ impl FinderPenalty { let n = rh[1]; debug_assert!(n <= self.qr_size * 3); let core = n > 0 && rh[2] == n && rh[3] == n * 3 && rh[4] == n && rh[5] == n; - ( i32::from(core && rh[0] >= n * 4 && rh[6] >= n) - + i32::from(core && rh[6] >= n * 4 && rh[0] >= n)) + i32::from(core && rh[0] >= n * 4 && rh[6] >= n) + + i32::from(core && rh[6] >= n * 4 && rh[0] >= n) }