From ca58a213de22d220175434f1700bb2f1bc14e3f8 Mon Sep 17 00:00:00 2001 From: philogy Date: Sun, 1 Sep 2024 22:45:23 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Fix=20clippy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assembler.rs | 4 ++-- src/assembly.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/assembler.rs b/src/assembler.rs index a200f19..8b4a7b8 100644 --- a/src/assembler.rs +++ b/src/assembler.rs @@ -44,6 +44,7 @@ impl MarkMap { panic!("Reference to nonexistent mark {} at index {}", id, index) }; + #[cfg(not(feature = "sanity-checks"))] Default::default() }) } @@ -174,8 +175,7 @@ pub fn assemble_minimized(asm: &[Asm]) -> Vec { } fn value_to_ref_extra_bytes(value: usize) -> u8 { - let out = value.checked_ilog2().unwrap_or_default() as u8 / 8 + 1; - out + value.checked_ilog2().unwrap_or_default() as u8 / 8 + 1 } #[cfg(test)] diff --git a/src/assembly.rs b/src/assembly.rs index 26fa90a..3d01bff 100644 --- a/src/assembly.rs +++ b/src/assembly.rs @@ -57,7 +57,6 @@ impl fmt::Display for Asm { write!(f, "({})", ref_type) } } - _ => write!(f, "{:?}", self), } } }