Skip to content

Commit 441e39d

Browse files
committed
changing panic to debug assert
1 parent 12fc979 commit 441e39d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fluent.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,8 +1407,7 @@ fn MutableStringBackend(comptime Self: type) type {
14071407
if (comptime min_matches == 0)
14081408
@compileError("replacment matches must be greater than zero");
14091409

1410-
if (replacement.len > min_matches)
1411-
@panic("replacement string length must be less than or equal to minimum possible regex match.");
1410+
std.debug.assert(replacement.len <= min_matches);
14121411

14131412
var r: usize = 0; // read
14141413
var w: usize = 0; // write

0 commit comments

Comments
 (0)