From bb8f7d07d3265bcaca197dfb967f342100b9d32f Mon Sep 17 00:00:00 2001 From: marvin-j97 Date: Tue, 21 Jan 2025 18:07:52 +0100 Subject: [PATCH] clippy --- src/journal/marker.rs | 2 +- src/recovery.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal/marker.rs b/src/journal/marker.rs index 799d04f..ea6a3ab 100644 --- a/src/journal/marker.rs +++ b/src/journal/marker.rs @@ -48,7 +48,7 @@ pub fn serialize_marker_item( // NOTE: Truncation is okay and actually needed #[allow(clippy::cast_possible_truncation)] - writer.write_u8(partition.as_bytes().len() as u8)?; + writer.write_u8(partition.len() as u8)?; writer.write_all(partition.as_bytes())?; // NOTE: Truncation is okay and actually needed diff --git a/src/recovery.rs b/src/recovery.rs index f6f586c..5625549 100644 --- a/src/recovery.rs +++ b/src/recovery.rs @@ -180,7 +180,7 @@ pub fn recover_sealed_memtables( // IMPORTANT: Only apply sealed memtables to partitions // that have a lower seqno to avoid double flushing let should_skip_sealed_memtable = - partition_lsn.map_or(false, |partition_lsn| partition_lsn >= handle.lsn); + partition_lsn.is_some_and(|partition_lsn| partition_lsn >= handle.lsn); if should_skip_sealed_memtable { handle.partition.tree.lock_active_memtable().clear();