wpt: improve hashmap creation readability

This commit is contained in:
Pierre Tachoire
2023-10-17 11:39:00 +02:00
parent 0d6c319f1b
commit aadc17292e

View File

@@ -25,10 +25,12 @@ const FileLoader = struct {
const Self = @This();
fn new(alloc: std.mem.Allocator, path: []const u8) Self {
const files = std.StringHashMap([]const u8).init(alloc);
return Self{
.path = path,
.alloc = alloc,
.files = std.StringHashMap([]const u8).init(alloc),
.files = files,
};
}
fn get(self: *Self, name: []const u8) ![]const u8 {