HashMap.put returns !void, not a !bool

This commit is contained in:
daurnimator
2021-02-27 13:49:02 +11:00
committed by Veikka Tuominen
parent 490654c332
commit d4af35b3fe
11 changed files with 32 additions and 33 deletions

View File

@@ -200,7 +200,7 @@ pub fn main() !void {
continue;
}
if (std.mem.startsWith(u8, ver, "GCC_")) continue;
_ = try global_ver_set.put(ver, undefined);
try global_ver_set.put(ver, undefined);
const gop = try global_fn_set.getOrPut(name);
if (gop.found_existing) {
if (!std.mem.eql(u8, gop.entry.value.lib, "c")) {
@@ -242,7 +242,7 @@ pub fn main() !void {
var buffered = std.io.bufferedWriter(vers_txt_file.writer());
const vers_txt = buffered.writer();
for (global_ver_list) |name, i| {
_ = global_ver_set.put(name, i) catch unreachable;
global_ver_set.put(name, i) catch unreachable;
try vers_txt.print("{s}\n", .{name});
}
try buffered.flush();