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 /lib/std/builtin.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 'lib/std/builtin.zig')
| -rw-r--r-- | lib/std/builtin.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 684432bd40..7fe295123e 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -531,7 +531,7 @@ pub const Version = struct { // found no digits or '.' before unexpected character if (end == 0) return error.InvalidVersion; - var it = std.mem.split(u8, text[0..end], "."); + var it = std.mem.splitScalar(u8, text[0..end], '.'); // substring is not empty, first call will succeed const major = it.first(); if (major.len == 0) return error.InvalidVersion; |
