aboutsummaryrefslogtreecommitdiff
path: root/lib/std/comptime_string_map.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/comptime_string_map.zig')
-rw-r--r--lib/std/comptime_string_map.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/comptime_string_map.zig b/lib/std/comptime_string_map.zig
index 3021f6bc1e..8cc5cac130 100644
--- a/lib/std/comptime_string_map.zig
+++ b/lib/std/comptime_string_map.zig
@@ -8,7 +8,7 @@ const mem = std.mem;
/// `kvs` expects a list literal containing list literals or an array/slice of structs
/// where `.@"0"` is the `[]const u8` key and `.@"1"` is the associated value of type `V`.
/// TODO: https://github.com/ziglang/zig/issues/4335
-pub fn ComptimeStringMap(comptime V: type, comptime kvs: var) type {
+pub fn ComptimeStringMap(comptime V: type, comptime kvs: anytype) type {
const precomputed = comptime blk: {
@setEvalBranchQuota(2000);
const KV = struct {
@@ -126,7 +126,7 @@ test "ComptimeStringMap slice of structs" {
testMap(map);
}
-fn testMap(comptime map: var) void {
+fn testMap(comptime map: anytype) void {
std.testing.expectEqual(TestEnum.A, map.get("have").?);
std.testing.expectEqual(TestEnum.B, map.get("nothing").?);
std.testing.expect(null == map.get("missing"));
@@ -165,7 +165,7 @@ test "ComptimeStringMap void value type, list literal of list literals" {
testSet(map);
}
-fn testSet(comptime map: var) void {
+fn testSet(comptime map: anytype) void {
std.testing.expectEqual({}, map.get("have").?);
std.testing.expectEqual({}, map.get("nothing").?);
std.testing.expect(null == map.get("missing"));