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 { // Vec impl FallibleVec for Vec { - #[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(vec: &mut Vec) -> Result<(), FailedAllocationError> { // SmallVec impl FallibleVec for SmallVec { - #[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 HashMap self.try_entry(key).unwrap() } + #[inline(always)] pub fn try_entry(&mut self, key: K) -> Result, FailedAllocationError> { // Gotta resize now. self.try_reserve(1)?;