File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1023,16 +1023,16 @@ where
1023
1023
where
1024
1024
Q : Hash + Equivalent < K > ,
1025
1025
{
1026
- if let Some ( ( _ , found) ) = self . find ( key) {
1026
+ if let Some ( found) = self . get_index_of ( key) {
1027
1027
let entry = & self . core . entries [ found] ;
1028
1028
Some ( ( found, & entry. key , & entry. value ) )
1029
1029
} else {
1030
1030
None
1031
1031
}
1032
1032
}
1033
1033
1034
- /// Return item index
1035
- pub fn entry_index < Q : ?Sized > ( & self , key : & Q ) -> Option < usize >
1034
+ /// Return item index, if it exists in the map
1035
+ pub fn get_index_of < Q : ?Sized > ( & self , key : & Q ) -> Option < usize >
1036
1036
where
1037
1037
Q : Hash + Equivalent < K > ,
1038
1038
{
Original file line number Diff line number Diff line change @@ -327,12 +327,12 @@ where
327
327
self . map . get_full ( value) . map ( |( i, x, & ( ) ) | ( i, x) )
328
328
}
329
329
330
- /// Return item index
331
- pub fn entry_index < Q : ?Sized > ( & self , value : & Q ) -> Option < usize >
330
+ /// Return item index, if it exists in the set
331
+ pub fn get_index_of < Q : ?Sized > ( & self , value : & Q ) -> Option < usize >
332
332
where
333
333
Q : Hash + Equivalent < T > ,
334
334
{
335
- self . map . entry_index ( value)
335
+ self . map . get_index_of ( value)
336
336
}
337
337
338
338
/// Adds a value to the set, replacing the existing value, if any, that is
You can’t perform that action at this time.
0 commit comments