From 6bc735051d38c1f84acaa40d8e724398e50dcc90 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 16 Mar 2020 15:33:39 +0000 Subject: indices can now return confidence levels also, tests pass again --- lib/MaildirIndexer/Index/ByRef.rakumod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/MaildirIndexer/Index/ByRef.rakumod') diff --git a/lib/MaildirIndexer/Index/ByRef.rakumod b/lib/MaildirIndexer/Index/ByRef.rakumod index 6e5b7f5..30ea58c 100644 --- a/lib/MaildirIndexer/Index/ByRef.rakumod +++ b/lib/MaildirIndexer/Index/ByRef.rakumod @@ -35,11 +35,11 @@ method del-path(IO:D $file, Str:D $mailbox --> Nil) { } } -method mailbox-for-email(MaildirIndexer::Email:D $email --> Str) { - my Str $result; +method mailbox-for-email(MaildirIndexer::Email:D $email --> Mailbox) { + my Mailbox $result; MaildirIndexer::LogTimelineSchema::Index::Find.log: :class('ByRef'), -> { for |$email.refs() -> $ref { - with %!mailboxes-for-id{$ref} { $result = .keys.sort.[0] } + with %!mailboxes-for-id{$ref} { $result = Mailbox.new(:name(.keys.sort.[0]),:1confidence) } } } return $result; -- cgit v1.2.3