We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d4b566 commit a027fa8Copy full SHA for a027fa8
lib/std/mem/Allocator.zig
@@ -303,7 +303,8 @@ fn allocBytesWithAlignment(
303
/// It is guaranteed to not move the pointer, however the allocator
304
/// implementation may refuse the resize request by returning `false`.
305
///
306
-/// `allocation` may be an empty slice, in which case a new allocation is made.
+/// `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.
308
309
/// `new_len` may be zero, in which case the allocation is freed.
310
pub fn resize(self: Allocator, allocation: anytype, new_len: usize) bool {
0 commit comments