File tree 1 file changed +3
-6
lines changed 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -222,9 +222,7 @@ where
222
222
/// # }
223
223
/// ```
224
224
pub fn find ( & self , hash : u64 , eq : impl FnMut ( & T ) -> bool ) -> Option < & T > {
225
- self . raw
226
- . find ( hash, eq)
227
- . map ( |bucket| unsafe { bucket. as_ref ( ) } )
225
+ self . raw . get ( hash, eq)
228
226
}
229
227
230
228
/// Returns a mutable reference to an entry in the table with the given hash
@@ -263,9 +261,7 @@ where
263
261
/// # }
264
262
/// ```
265
263
pub fn find_mut ( & mut self , hash : u64 , eq : impl FnMut ( & T ) -> bool ) -> Option < & mut T > {
266
- self . raw
267
- . find ( hash, eq)
268
- . map ( |bucket| unsafe { bucket. as_mut ( ) } )
264
+ self . raw . get_mut ( hash, eq)
269
265
}
270
266
271
267
/// Returns an `OccupiedEntry` for an entry in the table with the given hash
@@ -1788,6 +1784,7 @@ where
1788
1784
/// type will be removed.
1789
1785
///
1790
1786
/// [limitations]: https://smallcultfollowing.com/babysteps/blog/2018/06/15/mir-based-borrow-check-nll-status-update/#polonius
1787
+ ///
1791
1788
/// # Examples
1792
1789
///
1793
1790
/// ```
You can’t perform that action at this time.
0 commit comments