Use or_break and or_continue where appropriate in the core library
This commit is contained in:
1 parent
41a22bd83d
commit
14adcb9db8
14 files changed
+92
-142
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user