From bc8ae0dc5ff98afdc9ac142fa87cf7914803139e Mon Sep 17 00:00:00 2001 From: Tpt Date: Thu, 23 Feb 2023 10:18:19 +0100 Subject: [PATCH] Makes new Clippy happy --- lib/src/sparql/eval.rs | 9 +++++---- server/src/main.rs | 8 +------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/src/sparql/eval.rs b/lib/src/sparql/eval.rs index 794cd325..b7a2435f 100644 --- a/lib/src/sparql/eval.rs +++ b/lib/src/sparql/eval.rs @@ -786,6 +786,7 @@ impl SimpleEvaluator { } } + #[allow(clippy::redundant_closure)] // False positive in 1.60 fn accumulator_builder( dataset: &Rc, function: &PlanAggregationFunction, @@ -796,14 +797,14 @@ impl SimpleEvaluator { if distinct { Box::new(|| Box::new(DistinctAccumulator::new(CountAccumulator::default()))) } else { - Box::new(|| Box::new(CountAccumulator::default())) + Box::new(|| Box::::default()) } } PlanAggregationFunction::Sum => { if distinct { Box::new(|| Box::new(DistinctAccumulator::new(SumAccumulator::default()))) } else { - Box::new(|| Box::new(SumAccumulator::default())) + Box::new(|| Box::::default()) } } PlanAggregationFunction::Min => { @@ -818,10 +819,10 @@ impl SimpleEvaluator { if distinct { Box::new(|| Box::new(DistinctAccumulator::new(AvgAccumulator::default()))) } else { - Box::new(|| Box::new(AvgAccumulator::default())) + Box::new(|| Box::::default()) } } - PlanAggregationFunction::Sample => Box::new(|| Box::new(SampleAccumulator::default())), // DISTINCT does not make sense with sample + PlanAggregationFunction::Sample => Box::new(|| Box::::default()), // DISTINCT does not make sense with sample PlanAggregationFunction::GroupConcat { separator } => { let dataset = dataset.clone(); let separator = separator.clone(); diff --git a/server/src/main.rs b/server/src/main.rs index ef3f4234..546c90ab 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -45,13 +45,7 @@ struct Args { secondary_location: Option, /// Open underlying database in read only mode // see https://github.com/facebook/rocksdb/wiki/Read-only-and-Secondary-instances - #[arg( - short, - long, - global = true, - action, - conflicts_with = "secondary_location" - )] + #[arg(short, long, global = true, conflicts_with = "secondary_location")] readonly: bool, #[command(subcommand)] command: Command,