miri: avoid cloning AllocExtra

This commit is contained in:
Ralf Jung
2024-10-12 12:14:28 +02:00
parent fb20e4d3b9
commit bc4366b099
5 changed files with 31 additions and 18 deletions

View File

@@ -140,7 +140,7 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxIndexMap<K, V> {
#[inline(always)]
fn filter_map_collect<T>(&self, mut f: impl FnMut(&K, &V) -> Option<T>) -> Vec<T> {
self.iter().filter_map(move |(k, v)| f(k, &*v)).collect()
self.iter().filter_map(move |(k, v)| f(k, v)).collect()
}
#[inline(always)]