correctly skip first comma in bound function snippets
This commit is contained in:
parent
73b58abe51
commit
da170c44b9
@ -89,7 +89,7 @@ pub fn getFunctionSnippet(allocator: *std.mem.Allocator, tree: *ast.Tree, func:
|
|||||||
|
|
||||||
for (func.paramsConst()) |param, param_num| {
|
for (func.paramsConst()) |param, param_num| {
|
||||||
if (skip_self_param and param_num == 0) continue;
|
if (skip_self_param and param_num == 0) continue;
|
||||||
if (param_num != 0) try buffer.appendSlice(", ${") else try buffer.appendSlice("${");
|
if (param_num != @boolToInt(skip_self_param)) try buffer.appendSlice(", ${") else try buffer.appendSlice("${");
|
||||||
|
|
||||||
try buf_stream.print("{}:", .{param_num + 1});
|
try buf_stream.print("{}:", .{param_num + 1});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user