Lines Matching defs:shrink_to_fit
294 /// [`Vec::with_capacity(0)`][`Vec::with_capacity`], or by calling [`shrink_to_fit`]
346 /// [`shrink_to_fit`] or [`shrink_to`].
384 /// [`shrink_to_fit`]: Vec::shrink_to_fit
1151 /// vec.shrink_to_fit();
1156 pub fn shrink_to_fit(&mut self) {
1158 // they are equal, so we can avoid the panic case in `RawVec::shrink_to_fit`
1161 self.buf.shrink_to_fit(self.len);
1187 self.buf.shrink_to_fit(cmp::max(self.len, min_capacity));
1220 self.shrink_to_fit();