Fix clippy findings and related issues

This commit is contained in:
2026-10-13 21:25:50 +02:00
parent 7cfee9cce5
commit 3d1e8246a8
11 changed files with 179 additions and 254 deletions
+1 -1
View File
@@ -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,
}