diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2023-05-04 18:15:50 -0700 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2023-05-13 13:45:05 -0700 |
| commit | 2129f28953b72da2f1bb58ff063a044d737c59c4 (patch) | |
| tree | d8b12c947b4936cd96f753537c6effd36b2cb0c2 /test/src/Cases.zig | |
| parent | 815e53b147a321d0bdb47dc008aa8181f57175ac (diff) | |
| download | zig-2129f28953b72da2f1bb58ff063a044d737c59c4.tar.gz zig-2129f28953b72da2f1bb58ff063a044d737c59c4.zip | |
Update all std.mem.split calls to their appropriate function
Everywhere that can now use `splitScalar` should get a nice little performance boost.
Diffstat (limited to 'test/src/Cases.zig')
| -rw-r--r-- | test/src/Cases.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/src/Cases.zig b/test/src/Cases.zig index aa5369af93..7188e20859 100644 --- a/test/src/Cases.zig +++ b/test/src/Cases.zig @@ -877,7 +877,7 @@ const TestManifest = struct { if (trimmed.len == 0) break; // Parse key=value(s) - var kv_it = std.mem.split(u8, trimmed, "="); + var kv_it = std.mem.splitScalar(u8, trimmed, '='); const key = kv_it.first(); try manifest.config_map.putNoClobber(key, kv_it.next() orelse return error.MissingValuesForConfig); } @@ -895,7 +895,7 @@ const TestManifest = struct { ) ConfigValueIterator(T) { const bytes = self.config_map.get(key) orelse TestManifestConfigDefaults.get(self.type, key); return ConfigValueIterator(T){ - .inner = std.mem.split(u8, bytes, ","), + .inner = std.mem.splitScalar(u8, bytes, ','), }; } @@ -1399,7 +1399,7 @@ fn runOneCase( // Render the expected lines into a string that we can compare verbatim. var expected_generated = std.ArrayList(u8).init(arena); - var actual_line_it = std.mem.split(u8, actual_stderr.items, "\n"); + var actual_line_it = std.mem.splitScalar(u8, actual_stderr.items, '\n'); for (expected_errors) |expect_line| { const actual_line = actual_line_it.next() orelse { try expected_generated.appendSlice(expect_line); |
