Fix clippy findings and related issues
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ impl<E: Copy, T: Clone> ElementMap<E, T> {
|
||||
/// ```
|
||||
pub fn map<U: Clone>(&self, f: impl Fn(&T) -> U) -> ElementMap<E, U> {
|
||||
ElementMap {
|
||||
data: self.data.iter().map(|v| f(v)).collect(),
|
||||
data: self.data.iter().map(&f).collect(),
|
||||
default: f(&self.default),
|
||||
to_index: self.to_index,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user