Lines Matching refs:new_len
1481 pub unsafe fn set_len(&mut self, new_len: usize) { in set_len()
1482 debug_assert!(new_len <= self.capacity()); in set_len()
1484 self.len = new_len; in set_len()
2307 pub fn resize_with<F>(&mut self, new_len: usize, f: F) in resize_with()
2312 if new_len > len { in resize_with()
2313 self.extend_trusted(iter::repeat_with(f).take(new_len - len)); in resize_with()
2315 self.truncate(new_len); in resize_with()
2507 pub fn resize(&mut self, new_len: usize, value: T) { in resize()
2510 if new_len > len { in resize()
2511 self.extend_with(new_len - len, value) in resize()
2513 self.truncate(new_len); in resize()
2545 pub fn try_resize(&mut self, new_len: usize, value: T) -> Result<(), TryReserveError> { in try_resize()
2548 if new_len > len { in try_resize()
2549 self.try_extend_with(new_len - len, value) in try_resize()
2551 self.truncate(new_len); in try_resize()
2668 let (new_len, new_cap) = if T::IS_ZST { in into_flattened()
2684 unsafe { Vec::<T, A>::from_raw_parts_in(ptr.cast(), new_len, new_cap, alloc) } in into_flattened()