From 36937a5fdeee43e0b64e35059274f0b21e68a649 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 31 May 2020 22:28:10 -0300 Subject: [PATCH] remove ParamMap creation from runner --- src/runner.zig | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/runner.zig b/src/runner.zig index db40493..dd5fcd2 100644 --- a/src/runner.zig +++ b/src/runner.zig @@ -230,18 +230,8 @@ pub const Runner = struct { .index = command.index, }; - var params = ParamMap.init(self.allocator); - defer params.deinit(); - - inline for (@typeInfo(@TypeOf(command.parameters)).Struct.fields) |cmd_field| { - _ = try params.put( - cmd_field.name, - @field(command.parameters, cmd_field.name), - ); - } - var image = try self.getImage(); - try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, ¶ms); + try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, command.parameters); } fn newRunCommandSingle(