authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-07-21 14:17:25+02:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-07-21 14:17:25+02:00
logd74a49456d91cc5c15789e20301603fccbc12f11
tree508e61b920776a7b9b1cf06cec51296f9d6b0d3a
parent08f3c7960a17aab5b2faa94632bfcf6cd5012dc5

autodoc: use already open handles to output docs artifacts


1 files changed, 4 insertions(+), 4 deletions(-)

src/Autodoc.zig+4-4
......@@ -266,12 +266,12 @@ pub fn generateZirData(self: *Autodoc) !void {
266266 // last thing (that can fail) that we do is flush
267267 buffer.flush() catch unreachable;
268268 }
269
269270 // copy main.js, index.html
270 const docs = try self.module.comp.zig_lib_directory.join(self.arena, &.{ "docs", std.fs.path.sep_str });
271 var docs_dir = std.fs.openDirAbsolute(docs, .{}) catch unreachable;
271 var docs_dir = try self.module.comp.zig_lib_directory.handle.openDir("docs", .{});
272272 defer docs_dir.close();
273 docs_dir.copyFile("main.js", output_dir, "main.js", .{}) catch unreachable;
274 docs_dir.copyFile("index.html", output_dir, "index.html", .{}) catch unreachable;
273 try docs_dir.copyFile("main.js", output_dir, "main.js", .{});
274 try docs_dir.copyFile("index.html", output_dir, "index.html", .{});
275275}
276276
277277/// Represents a chain of scopes, used to resolve decl references to the