From d091de56865c50818dfc198e388dd88153a2f2e4 Mon Sep 17 00:00:00 2001 From: torque Date: Fri, 4 Aug 2023 00:15:29 -0700 Subject: [PATCH] command: add missing ptrCast While a lot of values will implicitly coerce to this field value, slices annoyingly do not and thus the explicit cast is required. --- source/command.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/command.zig b/source/command.zig index 800656c..ca8a754 100644 --- a/source/command.zig +++ b/source/command.zig @@ -358,7 +358,7 @@ pub fn CommandBuilder(comptime UserContext: type) type { fields = fields ++ &[_]StructField{.{ .name = param.name, .type = FieldType, - .default_value = default, + .default_value = @ptrCast(default), .is_comptime = false, .alignment = @alignOf(FieldType), }};