diff --git a/src/impls/create.rs b/src/impls/create.rs index 93d7a54..4b8309c 100644 --- a/src/impls/create.rs +++ b/src/impls/create.rs @@ -38,8 +38,8 @@ where { fn default() -> Self { Self { - map: Default::default(), - zero: Default::default(), + map: HashMap::default(), + zero: N::default(), } } } diff --git a/src/lib.rs b/src/lib.rs index 961ec85..312ebd7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -274,6 +274,7 @@ //! assert!(counter.into_map() == expected); //! ``` +#![allow(clippy::must_use_candidate)] mod impls; use num_traits::{One, Zero}; @@ -497,6 +498,7 @@ where /// be worth experimenting to see which of the two methods is faster. /// /// [`most_common_ordered`]: Counter::most_common_ordered + #[allow(clippy::missing_panics_doc)] // current implementation does not panic pub fn k_most_common_ordered(&self, k: usize) -> Vec<(T, N)> { use std::cmp::Reverse;