Update all std.mem.split calls to their appropriate function

Everywhere that can now use `splitScalar` should get a nice little performance boost.
This commit is contained in:
Ryan Liptak
2023-05-04 18:15:50 -07:00
parent 815e53b147
commit 2129f28953
27 changed files with 58 additions and 55 deletions

View File

@@ -250,7 +250,7 @@ fn render_autoconf(
var any_errors = false;
var line_index: u32 = 0;
var line_it = std.mem.split(u8, contents, "\n");
var line_it = std.mem.splitScalar(u8, contents, '\n');
while (line_it.next()) |line| : (line_index += 1) {
if (!std.mem.startsWith(u8, line, "#")) {
try output.appendSlice(line);
@@ -297,7 +297,7 @@ fn render_cmake(
var any_errors = false;
var line_index: u32 = 0;
var line_it = std.mem.split(u8, contents, "\n");
var line_it = std.mem.splitScalar(u8, contents, '\n');
while (line_it.next()) |line| : (line_index += 1) {
if (!std.mem.startsWith(u8, line, "#")) {
try output.appendSlice(line);