Skip to content

Commit

Permalink
#91 item() more
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 27, 2023
1 parent 31de889 commit 067fbc0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ impl<K: PartialEq + Clone, V: Clone, const N: usize> Map<K, V, N> {
K: Borrow<Q>,
{
for i in 0..self.next {
let p = unsafe { self.pairs[i].assume_init_ref() };
if let Some(p1) = &p {
if let Some(p1) = self.item(i) {
if p1.0.borrow() == k {
let p2 = unsafe { self.pairs[i].assume_init_mut() };
return Some(&mut p2.as_mut().unwrap().1);
Expand Down

0 comments on commit 067fbc0

Please sign in to comment.