| ... | ... | @@ -51,7 +51,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 51 | 51 | return if (alignment) |a| ([:s]align(a) T) else [:s]T; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | | /// Deinitialize with `deinit` or use `toOwnedSlice`. |
| 54 | /// Deinitialize with `deinit`. |
| 55 | 55 | pub fn init(allocator: Allocator) Self { |
| 56 | 56 | return Self{ |
| 57 | 57 | .items = &[_]T{}, |
| ... | ... | @@ -62,7 +62,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 62 | 62 | |
| 63 | 63 | /// Initialize with capacity to hold at least `num` elements. |
| 64 | 64 | /// The resulting capacity is likely to be equal to `num`. |
| 65 | | /// Deinitialize with `deinit` or use `toOwnedSlice`. |
| 65 | /// Deinitialize with `deinit`. |
| 66 | 66 | pub fn initCapacity(allocator: Allocator, num: usize) Allocator.Error!Self { |
| 67 | 67 | var self = Self.init(allocator); |
| 68 | 68 | try self.ensureTotalCapacityPrecise(num); |
| ... | ... | @@ -78,7 +78,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 78 | 78 | |
| 79 | 79 | /// ArrayList takes ownership of the passed in slice. The slice must have been |
| 80 | 80 | /// allocated with `allocator`. |
| 81 | | /// Deinitialize with `deinit` or use `toOwnedSlice`. |
| 81 | /// Deinitialize with `deinit`. |
| 82 | 82 | pub fn fromOwnedSlice(allocator: Allocator, slice: Slice) Self { |
| 83 | 83 | return Self{ |
| 84 | 84 | .items = slice, |
| ... | ... | @@ -475,7 +475,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 475 | 475 | /// An ArrayList, but the allocator is passed as a parameter to the relevant functions |
| 476 | 476 | /// rather than stored in the struct itself. The same allocator **must** be used throughout |
| 477 | 477 | /// the entire lifetime of an ArrayListUnmanaged. Initialize directly or with |
| 478 | | /// `initCapacity`, and deinitialize with `deinit` or use `toOwnedSlice`. |
| 478 | /// `initCapacity`, and deinitialize with `deinit`. |
| 479 | 479 | pub fn ArrayListUnmanaged(comptime T: type) type { |
| 480 | 480 | return ArrayListAlignedUnmanaged(T, null); |
| 481 | 481 | } |
| ... | ... | @@ -483,7 +483,7 @@ pub fn ArrayListUnmanaged(comptime T: type) type { |
| 483 | 483 | /// An ArrayListAligned, but the allocator is passed as a parameter to the relevant |
| 484 | 484 | /// functions rather than stored in the struct itself. The same allocator **must** |
| 485 | 485 | /// be used throughout the entire lifetime of an ArrayListAlignedUnmanaged. |
| 486 | | /// Initialize directly or with `initCapacity`, and deinitialize with `deinit` or use `toOwnedSlice`. |
| 486 | /// Initialize directly or with `initCapacity`, and deinitialize with `deinit`. |
| 487 | 487 | pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) type { |
| 488 | 488 | if (alignment) |a| { |
| 489 | 489 | if (a == @alignOf(T)) { |
| ... | ... | @@ -514,7 +514,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ |
| 514 | 514 | |
| 515 | 515 | /// Initialize with capacity to hold at least num elements. |
| 516 | 516 | /// The resulting capacity is likely to be equal to `num`. |
| 517 | | /// Deinitialize with `deinit` or use `toOwnedSlice`. |
| 517 | /// Deinitialize with `deinit`. |
| 518 | 518 | pub fn initCapacity(allocator: Allocator, num: usize) Allocator.Error!Self { |
| 519 | 519 | var self = Self{}; |
| 520 | 520 | try self.ensureTotalCapacityPrecise(allocator, num); |