Skip to content

Commit cae5a3a

Browse files
committed
Explain the fn argument
1 parent 425fe48 commit cae5a3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/raw/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,9 @@ impl<A: Allocator + Clone> RawTableInner<A> {
11701170
}
11711171
}
11721172

1173+
// We use `fn` argument here for `drop` as the function will only be called if the `hasher`
1174+
// panics which should be exceptionally rare. In return we only instantiate a single
1175+
// `prepare_rehash_in_place` per allocator (instead of per type and allocator)
11731176
#[allow(clippy::mut_mut)]
11741177
#[inline]
11751178
unsafe fn prepare_rehash_in_place<'s>(

0 commit comments

Comments
 (0)