From 83f16709ba212696f340b2a527dcad5f191d5f08 Mon Sep 17 00:00:00 2001
From: Sebastian <serunmal@gmail.com>
Date: Sun, 16 Jun 2024 18:58:48 +0200
Subject: [PATCH] Calling `split` is deprecated

The `split` function in std mem is depreacted and a `@compileError`, splitSequence,
splitAny, or splitScalar should be used instead.
---
 build.zig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.zig b/build.zig
index 0d83737..82ce9cb 100644
--- a/build.zig
+++ b/build.zig
@@ -459,7 +459,7 @@ fn resetLine() void {
 pub fn trimLines(allocator: std.mem.Allocator, buf: []const u8) ![]const u8 {
     var list = try std.ArrayList(u8).initCapacity(allocator, buf.len);
 
-    var iter = std.mem.split(u8, buf, " \n");
+    var iter = std.mem.splitSequence(u8, buf, " \n");
     while (iter.next()) |line| {
         // TODO: trimming CR characters is probably not necessary.
         const data = std.mem.trimRight(u8, line, " \r");
@@ -521,7 +521,7 @@ fn validate_exercises() bool {
             return false;
         }
 
-        var iter = std.mem.split(u8, ex.output, "\n");
+        var iter = std.mem.splitScalar(u8, ex.output, '\n');
         while (iter.next()) |line| {
             const output = std.mem.trimRight(u8, line, " \r");
             if (output.len != line.len) {