authorgravatar for justus@klausecker.deJustus Klausecker <justus@klausecker.de> 2025-10-22 01:03:43+02:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-10-22 11:41:16+02:00
loga027fa8b8c03f8c325c4347500d0487c6d366f81
tree48da8b01f97e28e79ac20d6449ec79f3a128b055
parent8d4b5662cd3d34f106b0e5b636db8c0d14ed541c

std.mem.Allocator: fix resize doc comment


1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/mem/Allocator.zig+2-1
...@@ -303,7 +303,8 @@ fn allocBytesWithAlignment(...@@ -303,7 +303,8 @@ fn allocBytesWithAlignment(
303/// It is guaranteed to not move the pointer, however the allocator303/// It is guaranteed to not move the pointer, however the allocator
304/// implementation may refuse the resize request by returning `false`.304/// implementation may refuse the resize request by returning `false`.
305///305///
306/// `allocation` may be an empty slice, in which case a new allocation is made.306/// `allocation` may be an empty slice, in which case `false` is returned,
307/// unless `new_len` is also 0, in which case `true` is returned.
307///308///
308/// `new_len` may be zero, in which case the allocation is freed.309/// `new_len` may be zero, in which case the allocation is freed.
309pub fn resize(self: Allocator, allocation: anytype, new_len: usize) bool {310pub fn resize(self: Allocator, allocation: anytype, new_len: usize) bool {