We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed94da1 commit cad762bCopy full SHA for cad762b
compiler/rustc_data_structures/src/vec_map.rs
@@ -33,10 +33,7 @@ where
33
self.0.iter().find(|(key, _)| k == key.borrow()).map(|elem| &elem.1)
34
}
35
36
- pub fn get_by<P>(&self, mut predicate: P) -> Option<&V>
37
- where
38
- for<'b> P: FnMut(&'b &(K, V)) -> bool,
39
- {
+ pub fn get_by(&self, mut predicate: impl FnMut(&(K, V)) -> bool) -> Option<&V> {
40
self.0.iter().find(|kv| predicate(kv)).map(|elem| &elem.1)
41
42
0 commit comments