mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
wpt: improve hashmap creation readability
This commit is contained in:
@@ -25,10 +25,12 @@ const FileLoader = struct {
|
|||||||
const Self = @This();
|
const Self = @This();
|
||||||
|
|
||||||
fn new(alloc: std.mem.Allocator, path: []const u8) Self {
|
fn new(alloc: std.mem.Allocator, path: []const u8) Self {
|
||||||
|
const files = std.StringHashMap([]const u8).init(alloc);
|
||||||
|
|
||||||
return Self{
|
return Self{
|
||||||
.path = path,
|
.path = path,
|
||||||
.alloc = alloc,
|
.alloc = alloc,
|
||||||
.files = std.StringHashMap([]const u8).init(alloc),
|
.files = files,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
fn get(self: *Self, name: []const u8) ![]const u8 {
|
fn get(self: *Self, name: []const u8) ![]const u8 {
|
||||||
|
|||||||
Reference in New Issue
Block a user