Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed May 20, 2024
1 parent d24fd62 commit eba3ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl<T> Node<T> {
arena.incr_discard(allocated);
Either::Left(e)
})?;
Ok((value_offset, value_size as u32))
Ok((value_offset, value_size))
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ pub(crate) enum Key<'a, 'b: 'a> {
}

impl<'a, 'b: 'a> Key<'a, 'b> {
#[inline]
pub(crate) fn on_fail(&self, arena: &crate::arena::Arena) {
if let Self::Vacant(key) = self {
arena.incr_discard(key.cap as u32);
Expand All @@ -180,6 +181,7 @@ impl<'a, 'b: 'a> Key<'a, 'b> {
}

impl<'a, 'b: 'a> AsRef<[u8]> for Key<'a, 'b> {
#[inline]
fn as_ref(&self) -> &[u8] {
match self {
Self::Occupied(key) => key,
Expand Down

0 comments on commit eba3ab3

Please sign in to comment.