| ... | @@ -119,7 +119,7 @@ pub fn StaticStringMapWithEql( | ... | @@ -119,7 +119,7 @@ pub fn StaticStringMapWithEql( |
| 119 | kvs.* = .{ | 119 | kvs.* = .{ |
| 120 | .keys = sorted_keys.ptr, | 120 | .keys = sorted_keys.ptr, |
| 121 | .values = sorted_vals.ptr, | 121 | .values = sorted_vals.ptr, |
| 122 | .len = kvs_list.len, | 122 | .len = @intCast(kvs_list.len), |
| 123 | }; | 123 | }; |
| 124 | self.kvs = kvs; | 124 | self.kvs = kvs; |
| 125 | | 125 | |
| ... | @@ -270,13 +270,14 @@ const testing = std.testing; | ... | @@ -270,13 +270,14 @@ const testing = std.testing; |
| 270 | const test_alloc = testing.allocator; | 270 | const test_alloc = testing.allocator; |
| 271 | | 271 | |
| 272 | test "list literal of list literals" { | 272 | test "list literal of list literals" { |
| 273 | const slice = [_]TestKV{ | 273 | const slice: []const TestKV = &.{ |
| 274 | .{ "these", .D }, | 274 | .{ "these", .D }, |
| 275 | .{ "have", .A }, | 275 | .{ "have", .A }, |
| 276 | .{ "nothing", .B }, | 276 | .{ "nothing", .B }, |
| 277 | .{ "incommon", .C }, | 277 | .{ "incommon", .C }, |
| 278 | .{ "samelen", .E }, | 278 | .{ "samelen", .E }, |
| 279 | }; | 279 | }; |
| | 280 | |
| 280 | const map = TestMap.initComptime(slice); | 281 | const map = TestMap.initComptime(slice); |
| 281 | try testMap(map); | 282 | try testMap(map); |
| 282 | // Default comparison is case sensitive | 283 | // Default comparison is case sensitive |