Fix clippy warnings.
This commit fixes the current set of (stable) clippy warnings in the repo.
This commit is contained in:
committed by
Andrew Brown
parent
1176e4f178
commit
9f506692c2
@@ -7,7 +7,7 @@ pub(crate) trait MapWithDefault<K, V: Default> {
|
||||
|
||||
impl<K: Eq + Hash, V: Default> MapWithDefault<K, V> for HashMap<K, V> {
|
||||
fn get_or_default(&mut self, k: K) -> &mut V {
|
||||
self.entry(k).or_insert_with(|| V::default())
|
||||
self.entry(k).or_insert_with(V::default)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user