Skip to content

Commit 08d427f

Browse files
committed
fix minor code nits
1 parent 47e5894 commit 08d427f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/lib.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,9 @@ impl<K: Hash + Eq, V, S: HashState> LinkedHashMap<K, V, S> {
258258
(Some(unsafe { &mut(*node_ptr).value }), Some(node_ptr))
259259
}
260260
};
261-
match node_ptr_opt {
262-
None => (),
263-
Some(node_ptr) => {
264-
self.detach(node_ptr);
265-
self.attach(node_ptr);
266-
}
261+
if let Some(node_ptr) = node_ptr_opt {
262+
self.detach(node_ptr);
263+
self.attach(node_ptr);
267264
}
268265
return value;
269266
}
@@ -466,7 +463,7 @@ impl<K: Hash + Eq, V, S: HashState> LinkedHashMap<K, V, S> {
466463
head: unsafe { (*self.head).prev },
467464
tail: self.head,
468465
remaining: self.len(),
469-
marker: marker::PhantomData
466+
marker: marker::PhantomData,
470467
}
471468
}
472469

0 commit comments

Comments
 (0)