From 948754c5d4b707c991c4db9cdfd968e6f4866ea4 Mon Sep 17 00:00:00 2001 From: Dominic <4678790+dweiller@users.noreply.github.com> Date: Wed, 8 Feb 2023 22:39:38 +1100 Subject: clone package table into custom test runner Co-authored-by: Veikka Tuominen --- src/Compilation.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index f19e83680d..18d0e46892 100644 --- 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, -- cgit v1.2.3