Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Jan 23, 2025
1 parent b55b4e8 commit bb8f7d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/journal/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn serialize_marker_item<W: Write>(

// 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
Expand Down
2 changes: 1 addition & 1 deletion src/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bb8f7d0

Please sign in to comment.