diff options
author | Paul Masurel <paul.masurel@gmail.com> | 2018-02-18 09:10:45 +0900 |
---|---|---|
committer | Paul Masurel <paul.masurel@gmail.com> | 2018-02-18 09:12:40 +0900 |
commit | 6c8c90d348214c7acfa24dfa0de17317d2f9a75b (patch) | |
tree | 44e48cec0a3644d64782c845301285552eb3c72d /src/query/scorer.rs | |
parent | eb50e92ec4156299f9eceec3cfca76638dfb90f0 (diff) |
Removed lifetime from scorer
Diffstat (limited to 'src/query/scorer.rs')
-rw-r--r-- | src/query/scorer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/query/scorer.rs b/src/query/scorer.rs index b76b618..cbe04db 100644 --- a/src/query/scorer.rs +++ b/src/query/scorer.rs @@ -9,7 +9,7 @@ use std::ops::DerefMut; /// Scored set of documents matching a query within a specific segment. /// /// See [`Query`](./trait.Query.html). -pub trait Scorer: DocSet { +pub trait Scorer: DocSet + 'static { /// Returns the score. /// /// This method will perform a bit of computation and is not cached. @@ -112,7 +112,7 @@ impl<TDocSet: DocSet> DocSet for ConstScorer<TDocSet> { } } -impl<TDocSet: DocSet> Scorer for ConstScorer<TDocSet> { +impl<TDocSet: DocSet + 'static> Scorer for ConstScorer<TDocSet> { fn score(&mut self) -> Score { 1f32 } |