From b8efce8f34a6e4b4a0de600cd8865291d052eaf4 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 18 Oct 2023 14:08:58 +0200 Subject: [PATCH] wpt: declare FilesMap type in FileLoader struct --- src/main_wpt.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main_wpt.zig b/src/main_wpt.zig index 155fe733..6c54d69b 100644 --- a/src/main_wpt.zig +++ b/src/main_wpt.zig @@ -17,12 +17,14 @@ const apis = jsruntime.compile(DOM.Interfaces); // FileLoader loads files content from the filesystem. const FileLoader = struct { - files: std.StringHashMap([]const u8), + const FilesMap = std.StringHashMap([]const u8); + + files: FilesMap, path: []const u8, alloc: std.mem.Allocator, 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{ .path = path,