Fix clippy warnings.

This commit fixes the current set of (stable) clippy warnings in the repo.
This commit is contained in:
Peter Huene
2019-10-23 23:15:42 -07:00
committed by Andrew Brown
parent 1176e4f178
commit 9f506692c2
93 changed files with 667 additions and 662 deletions

View File

@@ -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)
}
}