style(lib): address clippy code style warnings
* Remove unnecessary return statements. * Combine identical `match` arms. * Collapse nested conditional. * Use `assert_ne` where applicable. * Lifetime elision.
This commit is contained in:
committed by
Sean McArthur
parent
5d19ef88b4
commit
1059eb349a
@@ -109,7 +109,7 @@ impl<V: ?Sized + Any + 'static> PtrMapCell<V> {
|
||||
let one = mem::replace(map, PtrMap::Empty);
|
||||
match one {
|
||||
PtrMap::One(id, one) => {
|
||||
debug_assert!(id != key);
|
||||
debug_assert_ne!(id, key);
|
||||
let mut hm = HashMap::with_capacity(2);
|
||||
hm.insert(id, one);
|
||||
hm.insert(key, val);
|
||||
|
||||
Reference in New Issue
Block a user