@@ -849,6 +849,7 @@ impl<K, V, S> HashMap<K, V, S>
849849 /// let mut map: HashMap<&str, i32> = HashMap::new();
850850 /// map.reserve(10);
851851 /// ```
852+ #[ inline]
852853 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
853854 pub fn reserve ( & mut self , additional : usize ) {
854855 match self . reserve_internal ( additional, Infallible ) {
@@ -880,6 +881,7 @@ impl<K, V, S> HashMap<K, V, S>
880881 self . reserve_internal ( additional, Fallible )
881882 }
882883
884+ #[ inline]
883885 fn reserve_internal ( & mut self , additional : usize , fallibility : Fallibility )
884886 -> Result < ( ) , CollectionAllocErr > {
885887
@@ -1571,6 +1573,7 @@ impl<K, V, S> HashMap<K, V, S>
15711573 /// so that the map now contains keys which compare equal, search may start
15721574 /// acting erratically, with two keys randomly masking each other. Implementations
15731575 /// are free to assume this doesn't happen (within the limits of memory-safety).
1576+ #[ inline( always) ]
15741577 #[ unstable( feature = "hash_raw_entry" , issue = "56167" ) ]
15751578 pub fn raw_entry_mut ( & mut self ) -> RawEntryBuilderMut < K , V , S > {
15761579 self . reserve ( 1 ) ;
@@ -1911,6 +1914,7 @@ impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S>
19111914 }
19121915
19131916 /// Create a `RawEntryMut` from the given key and its hash.
1917+ #[ inline]
19141918 #[ unstable( feature = "hash_raw_entry" , issue = "56167" ) ]
19151919 pub fn from_key_hashed_nocheck < Q : ?Sized > ( self , hash : u64 , k : & Q ) -> RawEntryMut < ' a , K , V , S >
19161920 where K : Borrow < Q > ,
@@ -1919,6 +1923,7 @@ impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S>
19191923 self . from_hash ( hash, |q| q. borrow ( ) . eq ( k) )
19201924 }
19211925
1926+ #[ inline]
19221927 fn search < F > ( self , hash : u64 , is_match : F , compare_hashes : bool ) -> RawEntryMut < ' a , K , V , S >
19231928 where for < ' b > F : FnMut ( & ' b K ) -> bool ,
19241929 {
@@ -1941,6 +1946,7 @@ impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S>
19411946 }
19421947 }
19431948 /// Create a `RawEntryMut` from the given hash.
1949+ #[ inline]
19441950 #[ unstable( feature = "hash_raw_entry" , issue = "56167" ) ]
19451951 pub fn from_hash < F > ( self , hash : u64 , is_match : F ) -> RawEntryMut < ' a , K , V , S >
19461952 where for < ' b > F : FnMut ( & ' b K ) -> bool ,
@@ -2215,6 +2221,7 @@ impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> {
22152221
22162222 /// Sets the value of the entry with the VacantEntry's key,
22172223 /// and returns a mutable reference to it.
2224+ #[ inline]
22182225 #[ unstable( feature = "hash_raw_entry" , issue = "56167" ) ]
22192226 pub fn insert_hashed_nocheck ( self , hash : u64 , key : K , value : V ) -> ( & ' a mut K , & ' a mut V ) {
22202227 let hash = SafeHash :: new ( hash) ;
0 commit comments