aboutsummaryrefslogtreecommitdiff
path: root/lib/std/array_list_sentineled.zig
diff options
context:
space:
mode:
authorAnthony Arian <anthonyarian96@gmail.com>2020-07-20 10:25:54 +0100
committerAnthony Arian <anthonyarian96@gmail.com>2020-07-20 10:25:54 +0100
commit3658dd5e89cd16c011bdc52d334c1308f440157b (patch)
tree09564ab2db65acc4a52d82bccbf0eb572fbc865f /lib/std/array_list_sentineled.zig
parent68fe3e116d9c4bde67df990b8e0cbb3e70fc98b2 (diff)
parent596ca6cf70cf43c27e31bbcfc36bcdc70b13897a (diff)
downloadzig-3658dd5e89cd16c011bdc52d334c1308f440157b.tar.gz
zig-3658dd5e89cd16c011bdc52d334c1308f440157b.zip
Merge branch 'master' of https://github.com/ziglang/zig into 5002-fix-entrypoint-with-winmain
Diffstat (limited to 'lib/std/array_list_sentineled.zig')
-rw-r--r--lib/std/array_list_sentineled.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/array_list_sentineled.zig b/lib/std/array_list_sentineled.zig
index b83cc4ad62..828be7462f 100644
--- a/lib/std/array_list_sentineled.zig
+++ b/lib/std/array_list_sentineled.zig
@@ -69,7 +69,7 @@ pub fn ArrayListSentineled(comptime T: type, comptime sentinel: T) type {
}
/// Only works when `T` is `u8`.
- pub fn allocPrint(allocator: *Allocator, comptime format: []const u8, args: var) !Self {
+ pub fn allocPrint(allocator: *Allocator, comptime format: []const u8, args: anytype) !Self {
const size = std.math.cast(usize, std.fmt.count(format, args)) catch |err| switch (err) {
error.Overflow => return error.OutOfMemory,
};
@@ -82,7 +82,7 @@ pub fn ArrayListSentineled(comptime T: type, comptime sentinel: T) type {
self.list.deinit();
}
- pub fn span(self: var) @TypeOf(self.list.items[0..:sentinel]) {
+ pub fn span(self: anytype) @TypeOf(self.list.items[0..:sentinel]) {
return self.list.items[0..self.len() :sentinel];
}