| ... | ... | @@ -162,7 +162,7 @@ fn do(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comptime va |
| 162 | 162 | const func = @field(Ctx, "pek_" ++ v.name); |
| 163 | 163 | var list = std.ArrayList(u8).init(arena.allocator()); |
| 164 | 164 | errdefer list.deinit(); |
| 165 | | var args: FnArgsTuple(func) = undefined; |
| 165 | var args: std.meta.ArgsTuple(@TypeOf(func)) = undefined; |
| 166 | 166 | args.@"0" = alloc; |
| 167 | 167 | args.@"1" = list.writer(); |
| 168 | 168 | inline for (v.args) |arg, i| { |
| ... | ... | @@ -273,11 +273,3 @@ fn docap(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comptime |
| 273 | 273 | try do(Ctx, alloc, writer, bottom, data, ctx, indent, flag1); |
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | | |
| 277 | | fn FnArgsTuple(func: anytype) type { |
| 278 | | var types: []const type = &.{}; |
| 279 | | inline for (@typeInfo(@TypeOf(func)).Fn.args) |arg| { |
| 280 | | types = types ++ &[_]type{arg.arg_type.?}; |
| 281 | | } |
| 282 | | return std.meta.Tuple(types); |
| 283 | | } |