Clippy warnings fixes (#1885)

This commit is contained in:
Paul Masurel
2023-02-20 19:04:13 +09:00
committed by GitHub
parent 02bebf4ff5
commit e2aa5af075
2 changed files with 5 additions and 15 deletions

View File

@@ -9,15 +9,12 @@
// - index a few documents into our index
// - search for the best document matching a basic query
// - retrieve the best document's original content.
use std::collections::HashSet;
// ---
// Importing tantivy...
use tantivy::collector::{Count, TopDocs};
use tantivy::query::{FuzzyTermQuery, QueryParser};
use tantivy::query::FuzzyTermQuery;
use tantivy::schema::*;
use tantivy::{doc, DocId, Index, ReloadPolicy, Score, SegmentReader};
use tantivy::{doc, Index, ReloadPolicy};
use tempfile::TempDir;
fn main() -> tantivy::Result<()> {

View File

@@ -279,11 +279,7 @@ impl GenericSegmentAggregationResultsCollector {
.iter()
.enumerate()
.map(|(accessor_idx, (_key, req))| {
Ok(build_bucket_segment_agg_collector(
req,
accessor_idx,
false,
)?)
build_bucket_segment_agg_collector(req, accessor_idx, false)
})
.collect::<crate::Result<Vec<Box<dyn SegmentAggregationCollector>>>>()?;
let metrics = req
@@ -291,13 +287,10 @@ impl GenericSegmentAggregationResultsCollector {
.iter()
.enumerate()
.map(|(accessor_idx, (_key, req))| {
Ok(build_metric_segment_agg_collector(
req,
accessor_idx,
false,
)?)
build_metric_segment_agg_collector(req, accessor_idx, false)
})
.collect::<crate::Result<Vec<Box<dyn SegmentAggregationCollector>>>>()?;
let metrics = if metrics.is_empty() {
None
} else {