wpt: declare FilesMap type in FileLoader struct

This commit is contained in:
Pierre Tachoire
2023-10-18 14:08:58 +02:00
parent 0a3e2fe392
commit b8efce8f34

View File

@@ -17,12 +17,14 @@ const apis = jsruntime.compile(DOM.Interfaces);
// FileLoader loads files content from the filesystem. // FileLoader loads files content from the filesystem.
const FileLoader = struct { const FileLoader = struct {
files: std.StringHashMap([]const u8), const FilesMap = std.StringHashMap([]const u8);
files: FilesMap,
path: []const u8, path: []const u8,
alloc: std.mem.Allocator, alloc: std.mem.Allocator,
fn init(alloc: std.mem.Allocator, path: []const u8) FileLoader { fn init(alloc: std.mem.Allocator, path: []const u8) FileLoader {
const files = std.StringHashMap([]const u8).init(alloc); const files = FilesMap.init(alloc);
return FileLoader{ return FileLoader{
.path = path, .path = path,