diff options
-rw-r--r-- | components/fallible/lib.rs | 4 | ||||
-rw-r--r-- | components/hashglobe/src/hash_map.rs | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/components/fallible/lib.rs b/components/fallible/lib.rs index 816e20573f9..4a48190a1eb 100644 --- a/components/fallible/lib.rs +++ b/components/fallible/lib.rs @@ -27,7 +27,7 @@ pub trait FallibleVec<T> { // Vec impl<T> FallibleVec<T> for Vec<T> { - #[inline] + #[inline(always)] fn try_push(&mut self, val: T) -> Result<(), FailedAllocationError> { #[cfg(feature = "known_system_malloc")] { @@ -92,7 +92,7 @@ fn try_double_vec<T>(vec: &mut Vec<T>) -> Result<(), FailedAllocationError> { // SmallVec impl<T: Array> FallibleVec<T::Item> for SmallVec<T> { - #[inline] + #[inline(always)] fn try_push(&mut self, val: T::Item) -> Result<(), FailedAllocationError> { #[cfg(feature = "known_system_malloc")] { diff --git a/components/hashglobe/src/hash_map.rs b/components/hashglobe/src/hash_map.rs index c73f88cef66..69bd06344e0 100644 --- a/components/hashglobe/src/hash_map.rs +++ b/components/hashglobe/src/hash_map.rs @@ -1002,6 +1002,7 @@ impl<K, V, S> HashMap<K, V, S> self.try_entry(key).unwrap() } + #[inline(always)] pub fn try_entry(&mut self, key: K) -> Result<Entry<K, V>, FailedAllocationError> { // Gotta resize now. self.try_reserve(1)?; |