Skip to content

Commit

Permalink
🥢 Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Philogy committed Sep 24, 2024
1 parent eafa63a commit f4de48f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ impl MarkMap {
.map(|max_id| max_id + 1)
.unwrap_or_default();
let mut inner_mark_map = vec![None; mark_map_size];
let total_size = asm.iter().enumerate().fold(0, |offset, (index, chunk)| {
let new_offset = match chunk {
let total_size = asm
.iter()
.enumerate()
.fold(0, |offset, (index, chunk)| match chunk {
Asm::Ref(_) => offset + chunk.size() + ref_extra_bytes as usize,
Asm::Mark(id) => {
#[cfg(feature = "sanity-checks")]
Expand All @@ -28,10 +30,7 @@ impl MarkMap {
offset
}
_ => offset + chunk.size(),
};

new_offset
});
});

(Self(inner_mark_map), total_size)
}
Expand Down

0 comments on commit f4de48f

Please sign in to comment.