Lines Matching refs:set_len
1382 /// x.set_len(size);
1446 /// // which makes `set_len` safe to call.
1452 /// dict.set_len(dict_length);
1463 /// the inner vectors were not freed prior to the `set_len` call:
1473 /// vec.set_len(0);
1481 pub unsafe fn set_len(&mut self, new_len: usize) {
1531 self.set_len(len - 1);
1586 self.set_len(len + 1);
1640 self.set_len(len - 1);
1703 unsafe { self.set_len(0) };
1714 // It shifts unchecked elements to cover holes and `set_len` to the correct length.
1737 self.v.set_len(self.original_len - self.deleted_cnt);
1785 // All item are processed. This can be optimized to `set_len` by LLVM.
1882 self.vec.set_len(len - dropped);
1922 gap.vec.set_len(gap.write);
2073 other.set_len(0);
2149 self.set_len(start);
2269 // Unsafely `set_len` and copy items to `other`.
2271 self.set_len(at);
2272 other.set_len(other_len);
2357 /// [`set_len`] method.
2359 /// [`set_len`]: Vec::set_len
2375 /// v.set_len(3);
2399 /// the [`set_len`] method.
2401 /// [`set_len`]: Vec::set_len
2440 /// v.set_len(len + 4);
2454 /// Safety: changing returned .2 (&mut usize) is considered the same as calling `.set_len(_)`.
2697 // might not realize the store through `ptr` through self.set_len()
2726 // might not realize the store through `ptr` through self.set_len()
3052 self.set_len(len + 1);
3078 self.set_len(len + 1);
3251 self.set_len(0);
3548 // SAFETY: `.set_len(0)` is always sound.
3549 unsafe { vec.set_len(0) };
3554 // The items will not double-drop as the `set_len`