mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
Use explicit dyn trait object
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user