summaryrefslogtreecommitdiff
path: root/lib/MaildirIndexer/Email.rakumod
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MaildirIndexer/Email.rakumod')
-rw-r--r--lib/MaildirIndexer/Email.rakumod8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/MaildirIndexer/Email.rakumod b/lib/MaildirIndexer/Email.rakumod
index 4f92106..aabf185 100644
--- a/lib/MaildirIndexer/Email.rakumod
+++ b/lib/MaildirIndexer/Email.rakumod
@@ -18,11 +18,9 @@ method refs(--> Iterable) {
multi split-refs(Any --> Iterable) { return () }
multi split-refs(Str:D $str --> Iterable) {
- my @result;
MaildirIndexer::LogTimelineSchema::Parse::Header.log: {
- @result = $/<refs>».Str if $str ~~ m{'<' $<refs> = (<-[<>]>+)+ % [ '>' .*? '<' ] '>' };
+ return $/<refs>».Str if $str ~~ m{'<' $<refs> = (<-[<>]>+)+ % [ '>' .*? '<' ] '>' };
}
- return @result;
}
method addresses (--> Iterable) {
@@ -59,11 +57,9 @@ my grammar Address {
multi sub extract-addresses(Any --> Iterable) { return () }
multi sub extract-addresses(Str:D $str --> Iterable) {
- my @result;
MaildirIndexer::LogTimelineSchema::Parse::Header.log: {
with Address.parse($str) {
- @result = $_<addr>».Str;
+ return $_<addr>».Str;
}
}
- return @result;
}