NOBUG intellij misc lint

This commit is contained in:
Paul Masurel
2017-12-14 18:23:35 +09:00
parent 2589be3984
commit f24e5f405e
70 changed files with 259 additions and 264 deletions

View File

@@ -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)