From 4235c5bb98fc4e079805cd47245ecf120e71c806 Mon Sep 17 00:00:00 2001 From: FalsePattern <30945458+FalsePattern@users.noreply.github.com> Date: Sat, 17 Jun 2023 15:00:38 +0200 Subject: [PATCH] std.math.min and std.math.max were deprecated in 0.11.0-dev.3663 --- DiffMatchPatch.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DiffMatchPatch.zig b/DiffMatchPatch.zig index e9eb038..dcfc82b 100644 --- a/DiffMatchPatch.zig +++ b/DiffMatchPatch.zig @@ -132,7 +132,7 @@ fn diffInternal( } fn diffCommonPrefix(before: []const u8, after: []const u8) usize { - const n = std.math.min(before.len, after.len); + const n = @min(before.len, after.len); var i: usize = 0; while (i < n) : (i += 1) { @@ -145,7 +145,7 @@ fn diffCommonPrefix(before: []const u8, after: []const u8) usize { } fn diffCommonSuffix(before: []const u8, after: []const u8) usize { - const n = std.math.min(before.len, after.len); + const n = @min(before.len, after.len); var i: usize = 1; while (i <= n) : (i += 1) { @@ -950,8 +950,8 @@ fn diffCleanupSemantic(allocator: std.mem.Allocator, diffs: *DiffList) DiffError // Eliminate an equality that is smaller or equal to the edits on both // sides of it. if (last_equality != null and - (last_equality.?.len <= std.math.max(length_insertions1, length_deletions1)) and - (last_equality.?.len <= std.math.max(length_insertions2, length_deletions2))) + (last_equality.?.len <= @max(length_insertions1, length_deletions1)) and + (last_equality.?.len <= @max(length_insertions2, length_deletions2))) { // Duplicate record. try diffs.insert(