Makes new Clippy happy

pull/392/head
Tpt 2 years ago committed by Thomas Tanon
parent 2b271e45ac
commit ef2701dc0c
  1. 9
      lib/src/sparql/eval.rs
  2. 8
      server/src/main.rs

@ -786,6 +786,7 @@ impl SimpleEvaluator {
} }
} }
#[allow(clippy::redundant_closure)] // False positive in 1.60
fn accumulator_builder( fn accumulator_builder(
dataset: &Rc<DatasetView>, dataset: &Rc<DatasetView>,
function: &PlanAggregationFunction, function: &PlanAggregationFunction,
@ -796,14 +797,14 @@ impl SimpleEvaluator {
if distinct { if distinct {
Box::new(|| Box::new(DistinctAccumulator::new(CountAccumulator::default()))) Box::new(|| Box::new(DistinctAccumulator::new(CountAccumulator::default())))
} else { } else {
Box::new(|| Box::new(CountAccumulator::default())) Box::new(|| Box::<CountAccumulator>::default())
} }
} }
PlanAggregationFunction::Sum => { PlanAggregationFunction::Sum => {
if distinct { if distinct {
Box::new(|| Box::new(DistinctAccumulator::new(SumAccumulator::default()))) Box::new(|| Box::new(DistinctAccumulator::new(SumAccumulator::default())))
} else { } else {
Box::new(|| Box::new(SumAccumulator::default())) Box::new(|| Box::<SumAccumulator>::default())
} }
} }
PlanAggregationFunction::Min => { PlanAggregationFunction::Min => {
@ -818,10 +819,10 @@ impl SimpleEvaluator {
if distinct { if distinct {
Box::new(|| Box::new(DistinctAccumulator::new(AvgAccumulator::default()))) Box::new(|| Box::new(DistinctAccumulator::new(AvgAccumulator::default())))
} else { } else {
Box::new(|| Box::new(AvgAccumulator::default())) Box::new(|| Box::<AvgAccumulator>::default())
} }
} }
PlanAggregationFunction::Sample => Box::new(|| Box::new(SampleAccumulator::default())), // DISTINCT does not make sense with sample PlanAggregationFunction::Sample => Box::new(|| Box::<SampleAccumulator>::default()), // DISTINCT does not make sense with sample
PlanAggregationFunction::GroupConcat { separator } => { PlanAggregationFunction::GroupConcat { separator } => {
let dataset = dataset.clone(); let dataset = dataset.clone();
let separator = separator.clone(); let separator = separator.clone();

@ -45,13 +45,7 @@ struct Args {
secondary_location: Option<PathBuf>, secondary_location: Option<PathBuf>,
/// Open underlying database in read only mode /// Open underlying database in read only mode
// see https://github.com/facebook/rocksdb/wiki/Read-only-and-Secondary-instances // see https://github.com/facebook/rocksdb/wiki/Read-only-and-Secondary-instances
#[arg( #[arg(short, long, global = true, conflicts_with = "secondary_location")]
short,
long,
global = true,
action,
conflicts_with = "secondary_location"
)]
readonly: bool, readonly: bool,
#[command(subcommand)] #[command(subcommand)]
command: Command, command: Command,

Loading…
Cancel
Save