Skip to content

Commit

Permalink
Fix "calls to drop with a reference instead of an owned value does no…
Browse files Browse the repository at this point in the history
…thing"
  • Loading branch information
Dirbaio committed Jul 11, 2023
1 parent 14da181 commit 96a0087
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/linear_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,6 @@ impl<'a, K, V> Clone for Iter<'a, K, V> {
}
}

impl<K, V, const N: usize> Drop for LinearMap<K, V, N> {
fn drop(&mut self) {
// heapless::Vec implements drop right?
drop(&self.buffer);
// original code below
// unsafe { ptr::drop_in_place(self.buffer.as_mut_slice()) }
}
}

pub struct IterMut<'a, K, V> {
iter: slice::IterMut<'a, (K, V)>,
}
Expand Down

0 comments on commit 96a0087

Please sign in to comment.