Skip to content

Commit 24db007

Browse files
committed
std.mem.Allocator.remap: fix incorrect doc comment (part 2)
1 parent 7739545 commit 24db007

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/std/mem/Allocator.zig

+2-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ pub fn resize(self: Allocator, allocation: anytype, new_len: usize) bool {
308308
/// In such case, it is more efficient for the caller to perform those
309309
/// operations.
310310
///
311-
/// `allocation` may be an empty slice, in which case `null` is always returned.
311+
/// `allocation` may be an empty slice, in which case `null` is returned,
312+
/// unless `new_len` is also 0, in which case `allocation` is returned.
312313
///
313314
/// `new_len` may be zero, in which case the allocation is freed.
314315
pub fn remap(self: Allocator, allocation: anytype, new_len: usize) t: {

0 commit comments

Comments
 (0)