summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2019-12-28 17:34:28 +0000
committerdakkar <dakkar@thenautilus.net>2019-12-28 17:34:28 +0000
commit4faddf47f37d85280a30795f7cc01ff7f910f321 (patch)
treedf4212b817a2ef179636d1cfd946f54bca1ddabe
parentmore types, counts seems to work better this way (diff)
downloadMaildirIndexer-4faddf47f37d85280a30795f7cc01ff7f910f321.tar.gz
MaildirIndexer-4faddf47f37d85280a30795f7cc01ff7f910f321.tar.bz2
MaildirIndexer-4faddf47f37d85280a30795f7cc01ff7f910f321.zip
no need to .key on pairs we don't care about
-rw-r--r--lib/MaildirIndexer/Index/ByAddresses.pm64
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MaildirIndexer/Index/ByAddresses.pm6 b/lib/MaildirIndexer/Index/ByAddresses.pm6
index e2a96c3..4f24b37 100644
--- a/lib/MaildirIndexer/Index/ByAddresses.pm6
+++ b/lib/MaildirIndexer/Index/ByAddresses.pm6
@@ -84,9 +84,9 @@ method mailbox-for-email(MaildirIndexer::Email:D $email --> Str) {
MaildirIndexer::LogTimelineSchema::Index::Find.log: :class('ByAddresses'), -> {
my %prediction = self.predict-mailbox-given-addresses($email.addresses);
- my @most-probable-mailboxes = %prediction.pairs.sort(*.value).map(*.key);
+ my @most-probable-mailboxes = %prediction.pairs.sort(*.value);
- if @most-probable-mailboxes -> $_ { $result = .[*-1] }
+ if @most-probable-mailboxes -> $_ { $result = .[*-1].key }
}
return $result;
}