mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.mem.Allocator: fix resize doc comment
This commit is contained in:
parent
8d4b5662cd
commit
a027fa8b8c
@ -303,7 +303,8 @@ fn allocBytesWithAlignment(
|
||||
/// It is guaranteed to not move the pointer, however the allocator
|
||||
/// implementation may refuse the resize request by returning `false`.
|
||||
///
|
||||
/// `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,
|
||||
/// unless `new_len` is also 0, in which case `true` is returned.
|
||||
///
|
||||
/// `new_len` may be zero, in which case the allocation is freed.
|
||||
pub fn resize(self: Allocator, allocation: anytype, new_len: usize) bool {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user