Replace anytype with explicit []const {s}Command

This commit is contained in:
InKryption
2021-11-05 17:45:15 +00:00
committed by GitHub
parent a6063cc89e
commit d9c1c79223

View File

@@ -1015,10 +1015,9 @@ fn Renderer(comptime WriterType: type) type {
};
try self.writer.print(
\\pub fn {s}Wrapper(comptime cmds: anytype) type {{
\\ const cmd_array: [cmds.len]{s}Command = cmds;
\\pub fn {s}Wrapper(comptime cmds: []const {s}Command) type {{
\\ comptime var fields: [cmds.len]std.builtin.TypeInfo.StructField = undefined;
\\ inline for (cmd_array) |cmd, i| {{
\\ inline for (cmds) |cmd, i| {{
\\ const PfnType = cmd.PfnType();
\\ fields[i] = .{{
\\ .name = cmd.symbol(),