Skip to content

Commit

Permalink
feat: Micro optimizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 19, 2021
1 parent c4e92f5 commit e209721
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SimpleCachingIteratorAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ public function getIterator(): Traversable

$this->isDone = true;

return yield from $this->iterator->getCache();
yield from $this->iterator->getCache();
}
}
2 changes: 1 addition & 1 deletion tests/benchmarks/GeneratorCacheBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function test(Traversable $input): void
$c[] = [$key, $value];
}

if ($a !== $b) {
if ($b !== $c) {
throw new Exception('$a !== $b');
}
}
Expand Down

0 comments on commit e209721

Please sign in to comment.