File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -222,9 +222,7 @@ where
222222 /// # }
223223 /// ```
224224 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)
228226 }
229227
230228 /// Returns a mutable reference to an entry in the table with the given hash
@@ -263,9 +261,7 @@ where
263261 /// # }
264262 /// ```
265263 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)
269265 }
270266
271267 /// Returns an `OccupiedEntry` for an entry in the table with the given hash
@@ -1788,6 +1784,7 @@ where
17881784/// type will be removed.
17891785///
17901786/// [limitations]: https://smallcultfollowing.com/babysteps/blog/2018/06/15/mir-based-borrow-check-nll-status-update/#polonius
1787+ ///
17911788/// # Examples
17921789///
17931790/// ```
You can’t perform that action at this time.
0 commit comments