mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Use or_break and or_continue where appropriate in the core library
This commit is contained in:
@@ -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