summaryrefslogtreecommitdiffstats
path: root/src/query/scorer.rs
diff options
context:
space:
mode:
authorPaul Masurel <paul.masurel@gmail.com>2018-02-18 09:10:45 +0900
committerPaul Masurel <paul.masurel@gmail.com>2018-02-18 09:12:40 +0900
commit6c8c90d348214c7acfa24dfa0de17317d2f9a75b (patch)
tree44e48cec0a3644d64782c845301285552eb3c72d /src/query/scorer.rs
parenteb50e92ec4156299f9eceec3cfca76638dfb90f0 (diff)
Removed lifetime from scorer
Diffstat (limited to 'src/query/scorer.rs')
-rw-r--r--src/query/scorer.rs4
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
}