Skip to content

Commit c1a173b

Browse files
oderskynicolasstuckisjrd
authored
Apply suggestions from code review
Co-authored-by: Nicolas Stucki <[email protected]> Co-authored-by: Sébastien Doeraene <[email protected]>
1 parent d253610 commit c1a173b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/src/scala/util/boundary.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import control.ControlException
1212
* The `Break` exception class extends `ControlException` which is a regular
1313
* `RuntimeException`, optimized so that stack trace generation is suppressed.
1414
* - Better performance: breaks to enclosing scopes in the same method can
15-
* be rwritten to jumps.
15+
* be rewritten to jumps.
1616
*/
1717
object boundary:
1818

tests/run/breaks.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ object Test {
1111
def takeUntil(xs: List[Int], elem: Int) =
1212
boundary:
1313
var buf = new ListBuffer[Int]
14-
for x <- xs yield
14+
for x <- xs do
1515
if x == elem then break(buf.toList)
1616
buf += x
17-
x
17+
xs
1818

1919
trait Animal
2020
object Dog extends Animal

0 commit comments

Comments
 (0)