mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 01:02:55 +00:00
Clippy warnings fixes (#1885)
This commit is contained in:
@@ -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<()> {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user