Skip to content

Commit 2fd03fc

Browse files
authored
std.math.min and std.math.max were deprecated in 0.11.0-dev.3663 (#13)
1 parent b966296 commit 2fd03fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

DiffMatchPatch.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn diffInternal(
132132
}
133133

134134
fn diffCommonPrefix(before: []const u8, after: []const u8) usize {
135-
const n = std.math.min(before.len, after.len);
135+
const n = @min(before.len, after.len);
136136
var i: usize = 0;
137137

138138
while (i < n) : (i += 1) {
@@ -145,7 +145,7 @@ fn diffCommonPrefix(before: []const u8, after: []const u8) usize {
145145
}
146146

147147
fn diffCommonSuffix(before: []const u8, after: []const u8) usize {
148-
const n = std.math.min(before.len, after.len);
148+
const n = @min(before.len, after.len);
149149
var i: usize = 1;
150150

151151
while (i <= n) : (i += 1) {
@@ -950,8 +950,8 @@ fn diffCleanupSemantic(allocator: std.mem.Allocator, diffs: *DiffList) DiffError
950950
// Eliminate an equality that is smaller or equal to the edits on both
951951
// sides of it.
952952
if (last_equality != null and
953-
(last_equality.?.len <= std.math.max(length_insertions1, length_deletions1)) and
954-
(last_equality.?.len <= std.math.max(length_insertions2, length_deletions2)))
953+
(last_equality.?.len <= @max(length_insertions1, length_deletions1)) and
954+
(last_equality.?.len <= @max(length_insertions2, length_deletions2)))
955955
{
956956
// Duplicate record.
957957
try diffs.insert(

0 commit comments

Comments
 (0)