Skip to content

Commit

Permalink
Remove warnings about using Any in string context
Browse files Browse the repository at this point in the history
`.bisected` can be empty for some modules, so we can't use that for
sorting. Grep first instead of next-ing inside the loop.
  • Loading branch information
AlexDaniel committed Apr 16, 2020
1 parent bba41de commit 5e65ba0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/blin.p6
Expand Up @@ -385,13 +385,11 @@ note '🥞🥞 Saving the failure output';
sub save-markdown {
my $markdown-output = '';

for @modules.sort({
for @modules.grep(*.done.result == Fail).sort({
$^a.bisected cmp $^b.bisected || $^a.name cmp $^b.name
}) {
next unless (my $result = .done ?? .done.result !! Unknown) == Fail;

$markdown-output ~= qq:to/EOM/;
* [ ] [{ .name }](https://modules.raku.org/dist/{ .name }) – { $result }, { ''
* [ ] [{ .name }](https://modules.raku.org/dist/{ .name }) – { .done.result }, { ''
} Bisected: { .bisected }
<details><Summary>Old Output</summary>
Expand All @@ -407,7 +405,6 @@ sub save-markdown {
```
</details>
EOM

spurt $markdown-path, $markdown-output;
}
}
Expand Down

0 comments on commit 5e65ba0

Please sign in to comment.