Skip to content

Commit

Permalink
Micro-optimization of Bool method
Browse files Browse the repository at this point in the history
It is enough to check for `Planned`.
  • Loading branch information
vrurg committed Aug 27, 2019
1 parent 8e8868a commit e424248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.c/Promise.pm6
Expand Up @@ -160,7 +160,7 @@ my class Promise does Awaitable {
}

multi method Bool(Promise:D:) {
so $!status == Broken || $!status == Kept
$!status != Planned
}

method cause(Promise:D:) {
Expand Down

0 comments on commit e424248

Please sign in to comment.