Use or_break and or_continue where appropriate in the core library

This commit is contained in:
gingerBill
2023-09-30 15:34:39 +01:00
parent 41a22bd83d
commit 14adcb9db8
14 changed files with 92 additions and 142 deletions
+2 -3
View File
@@ -775,10 +775,9 @@ gsub_with :: proc(
haystack := haystack
for {
length, err := find_aux(haystack, pattern, 0, false, &captures)
length := find_aux(haystack, pattern, 0, false, &captures) or_break
// done
if length == 0 || err != .OK {
if length == 0 {
break
}