From 4faddf47f37d85280a30795f7cc01ff7f910f321 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 28 Dec 2019 17:34:28 +0000 Subject: no need to .key on pairs we don't care about --- lib/MaildirIndexer/Index/ByAddresses.pm6 | 4 ++-- 1 file 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; } -- cgit v1.2.3