diff options
author | dakkar <dakkar@thenautilus.net> | 2019-12-28 17:34:28 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2019-12-28 17:34:28 +0000 |
commit | 4faddf47f37d85280a30795f7cc01ff7f910f321 (patch) | |
tree | df4212b817a2ef179636d1cfd946f54bca1ddabe /lib/MaildirIndexer | |
parent | more types, counts seems to work better this way (diff) | |
download | MaildirIndexer-4faddf47f37d85280a30795f7cc01ff7f910f321.tar.gz MaildirIndexer-4faddf47f37d85280a30795f7cc01ff7f910f321.tar.bz2 MaildirIndexer-4faddf47f37d85280a30795f7cc01ff7f910f321.zip |
no need to .key on pairs we don't care about
Diffstat (limited to 'lib/MaildirIndexer')
-rw-r--r-- | lib/MaildirIndexer/Index/ByAddresses.pm6 | 4 |
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; } |