mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-08 01:52:54 +00:00
NOBUG intellij misc lint
This commit is contained in:
@@ -27,7 +27,7 @@ pub struct BooleanQuery {
|
||||
|
||||
impl From<Vec<(Occur, Box<Query>)>> for BooleanQuery {
|
||||
fn from(subqueries: Vec<(Occur, Box<Query>)>) -> BooleanQuery {
|
||||
BooleanQuery { subqueries: subqueries }
|
||||
BooleanQuery { subqueries }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,12 +37,10 @@ impl Query for BooleanQuery {
|
||||
}
|
||||
|
||||
fn weight(&self, searcher: &Searcher) -> Result<Box<Weight>> {
|
||||
let sub_weights = try!(
|
||||
self.subqueries
|
||||
.iter()
|
||||
.map(|&(ref _occur, ref subquery)| subquery.weight(searcher))
|
||||
.collect()
|
||||
);
|
||||
let sub_weights = self.subqueries
|
||||
.iter()
|
||||
.map(|&(ref _occur, ref subquery)| subquery.weight(searcher))
|
||||
.collect::<Result<_>>()?;
|
||||
let occurs: Vec<Occur> = self.subqueries
|
||||
.iter()
|
||||
.map(|&(ref occur, ref _subquery)| *occur)
|
||||
|
||||
Reference in New Issue
Block a user