authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-04-09 10:36:05+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-09 10:04:16-07:00
log1943c2dc687ecb2dcc818ea5c1e8edb9544849fe
tree65f21a4eef03ab7124ea764fc1d067978a136ed7
parent5ebcd8ccafeab0d8ddbdb9723f7e7a50ecc60a5f

testing: Use indexOfScalar instead of indexOf


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/testing.zig+1-1
......@@ -431,7 +431,7 @@ fn printIndicatorLine(source: []const u8, indicator_index: usize) void {
431431
432432fn printWithVisibleNewlines(source: []const u8) void {
433433 var i: usize = 0;
434 while (std.mem.indexOf(u8, source[i..], "\n")) |nl| : (i += nl + 1) {
434 while (std.mem.indexOfScalar(u8, source[i..], '\n')) |nl| : (i += nl + 1) {
435435 printLine(source[i .. i + nl]);
436436 }
437437 print("{s}␃\n", .{source[i..]}); // End of Text symbol (ETX)