Use explicit dyn
trait object
This commit is contained in:
parent
edc2fb5f60
commit
5958fa6a70
@ -18,7 +18,7 @@ use crate::AllocMap;
|
||||
pub struct MonoHashMap<K: Hash + Eq, V>(RefCell<FxHashMap<K, Box<V>>>);
|
||||
|
||||
impl<K: Hash + Eq, V> MonoHashMap<K, V> {
|
||||
pub fn values<T>(&self, f: impl FnOnce(&mut Iterator<Item=&V>) -> T) -> T {
|
||||
pub fn values<T>(&self, f: impl FnOnce(&mut dyn Iterator<Item=&V>) -> T) -> T {
|
||||
f(&mut self.0.borrow().values().map(|v| &**v))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user