Skip to content

Commit 32e8caa

Browse files
authored
Merge pull request #495 from savi-lang/remove/until-methods
Remove `*_until`-style iteration methods.
2 parents d59b999 + a549617 commit 32e8caa

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

core/Indexable.savi

-24
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,6 @@
3131
yield value
3232
)
3333

34-
:: DEPRECATED: Use `break` to exit early from `each` if needed.
35-
:fun each_until(
36-
from USize = 0
37-
to = USize.max_value
38-
stride USize = 1
39-
)
40-
:yields for Bool // TODO: this type hint shouldn't be needed
41-
@each(from, to, stride) -> (value |
42-
return True if (yield value)
43-
)
44-
False
45-
46-
:: DEPRECATED: Use `break` to exit early from `each_with_index` if needed.
47-
:fun each_with_index_until(
48-
from USize = 0
49-
to = USize.max_value
50-
stride USize = 1
51-
)
52-
:yields for Bool // TODO: this type hint shouldn't be needed
53-
@each_with_index(from, to, stride) -> (value, index |
54-
return True if (yield (value, index))
55-
)
56-
False
57-
5834
:fun has_any(
5935
from USize = 0
6036
to = USize.max_value

core/String.savi

-8
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,6 @@
230230
yield value
231231
)
232232

233-
:: DEPRECATED: Use `break` to exit early from `each_byte` if needed.
234-
:fun each_byte_until(from USize = 0, to = USize.max_value, stride USize = 1)
235-
:yields for Bool
236-
@each_byte(from, to, stride) -> (byte |
237-
return True if (yield byte)
238-
)
239-
False
240-
241233
// TODO: Move to be on a new `Indexable.Bytes` trait?
242234
:fun each_byte_with_index(from USize = 0, to = USize.max_value, stride USize = 1)
243235
index = from

0 commit comments

Comments
 (0)