diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-04-09 10:36:05 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-09 10:04:16 -0700 |
| commit | 1943c2dc687ecb2dcc818ea5c1e8edb9544849fe (patch) | |
| tree | 65f21a4eef03ab7124ea764fc1d067978a136ed7 /lib | |
| parent | 5ebcd8ccafeab0d8ddbdb9723f7e7a50ecc60a5f (diff) | |
| download | zig-1943c2dc687ecb2dcc818ea5c1e8edb9544849fe.tar.gz zig-1943c2dc687ecb2dcc818ea5c1e8edb9544849fe.zip | |
testing: Use indexOfScalar instead of indexOf
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/testing.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig index eb2b6e87b3..02947216e3 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -431,7 +431,7 @@ fn printIndicatorLine(source: []const u8, indicator_index: usize) void { fn printWithVisibleNewlines(source: []const u8) void { var i: usize = 0; - while (std.mem.indexOf(u8, source[i..], "\n")) |nl| : (i += nl + 1) { + while (std.mem.indexOfScalar(u8, source[i..], '\n')) |nl| : (i += nl + 1) { printLine(source[i .. i + nl]); } print("{s}␃\n", .{source[i..]}); // End of Text symbol (ETX) |
