diff --git a/container/src/lib.rs b/container/src/lib.rs index 83d5f528e..06351bbb7 100644 --- a/container/src/lib.rs +++ b/container/src/lib.rs @@ -187,10 +187,10 @@ impl DrainContainer for Vec { } impl SizableContainer for Vec { - fn at_capacity(&self) -> bool { + #[inline] fn at_capacity(&self) -> bool { self.len() == self.capacity() } - fn ensure_capacity(&mut self, stash: &mut Option) { + #[inline] fn ensure_capacity(&mut self, stash: &mut Option) { if self.capacity() == 0 { *self = stash.take().unwrap_or_default(); self.clear();