Skip to content

Commit

Permalink
Combine shift line into loop
Browse files Browse the repository at this point in the history
  • Loading branch information
icy-arctic-fox committed Aug 8, 2024
1 parent 88a0243 commit 7d7bda6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/spectator/core/example_group.cr
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ module Spectator::Core

def each(& : Item ->) : Nil
stack = [self] of Item
until stack.empty?
item = stack.shift
while item = stack.shift?
yield item
if item.is_a?(ExampleGroup)
stack.concat(item.children)
Expand Down

0 comments on commit 7d7bda6

Please sign in to comment.