zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 948754c5d4b707c991c4db9cdfd968e6f4866ea4 (tree)
parent edc0e84270c04acf432096c4772bfe199afdaf15
Author: Dominic <4678790+dweiller@users.noreply.github.com>
Date:   Wed,  8 Feb 2023 22:39:38 +1100

clone package table into custom test runner

Co-authored-by: Veikka Tuominen <git@vexu.eu>
Diffstat:
Msrc/Compilation.zig | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/Compilation.zig b/src/Compilation.zig @@ -1627,10 +1627,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const pkg = try Package.create(gpa, "root", test_dir, basename); // copy package table from main_pkg to root_pkg - var iter = main_pkg.table.valueIterator(); - while (iter.next()) |v| { - try pkg.add(gpa, v.*); - } + pkg.table = try main_pkg.table.clone(gpa); break :test_pkg pkg; } else try Package.createWithDir( gpa,