From 8b2622cdd58cec697d9d1f8f49717b6ce7ee3e2e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 8 Dec 2019 22:53:51 -0500 Subject: std.fmt.format: tuple parameter instead of var args --- lib/std/buffer.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/std/buffer.zig') diff --git a/lib/std/buffer.zig b/lib/std/buffer.zig index 46c55a32b8..55a5a890d6 100644 --- a/lib/std/buffer.zig +++ b/lib/std/buffer.zig @@ -16,7 +16,7 @@ pub const Buffer = struct { mem.copy(u8, self.list.items, m); return self; } - + /// Initialize memory to size bytes of undefined values. /// Must deinitialize with deinit. pub fn initSize(allocator: *Allocator, size: usize) !Buffer { @@ -24,7 +24,7 @@ pub const Buffer = struct { try self.resize(size); return self; } - + /// Initialize with capacity to hold at least num bytes. /// Must deinitialize with deinit. pub fn initCapacity(allocator: *Allocator, num: usize) !Buffer { @@ -64,7 +64,7 @@ pub const Buffer = struct { return result; } - pub fn allocPrint(allocator: *Allocator, comptime format: []const u8, args: ...) !Buffer { + pub fn allocPrint(allocator: *Allocator, comptime format: []const u8, args: var) !Buffer { const countSize = struct { fn countSize(size: *usize, bytes: []const u8) (error{}!void) { size.* += bytes.len; @@ -107,7 +107,7 @@ pub const Buffer = struct { pub fn len(self: Buffer) usize { return self.list.len - 1; } - + pub fn capacity(self: Buffer) usize { return if (self.list.items.len > 0) self.list.items.len - 1 -- cgit v1.2.3