Skip to content

Commit 76b459b

Browse files
committed
Use more precise capturing for some impl Trait
I think it doesn't really matter in this internal-only case, but it's still closer to the true intent.
1 parent b3d9cc3 commit 76b459b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/map/core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ struct RefMut<'a, K, V> {
4747
}
4848

4949
#[inline(always)]
50-
fn get_hash<K, V>(entries: &[Bucket<K, V>]) -> impl Fn(&usize) -> u64 + '_ {
50+
fn get_hash<K, V>(entries: &[Bucket<K, V>]) -> impl Fn(&usize) -> u64 + use<'_, K, V> {
5151
move |&i| entries[i].hash.get()
5252
}
5353

5454
#[inline]
5555
fn equivalent<'a, K, V, Q: ?Sized + Equivalent<K>>(
5656
key: &'a Q,
5757
entries: &'a [Bucket<K, V>],
58-
) -> impl Fn(&usize) -> bool + 'a {
58+
) -> impl Fn(&usize) -> bool + use<'a, K, V, Q> {
5959
move |&i| Q::equivalent(key, &entries[i].key)
6060
}
6161

0 commit comments

Comments
 (0)