commit 1943c2dc687ecb2dcc818ea5c1e8edb9544849fe (tree)
parent 5ebcd8ccafeab0d8ddbdb9723f7e7a50ecc60a5f
Author: LemonBoy <thatlemon@gmail.com>
Date: Fri, 9 Apr 2021 10:36:05 +0200
testing: Use indexOfScalar instead of indexOf
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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)