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(
dataset: &Rc<DatasetView>,
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::<CountAccumulator>::default())
}
}
PlanAggregationFunction::Sum => {
if distinct {
Box::new(|| Box::new(DistinctAccumulator::new(SumAccumulator::default())))
} else {
Box::new(|| Box::new(SumAccumulator::default()))
Box::new(|| Box::<SumAccumulator>::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::<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 } => {
let dataset = dataset.clone();
let separator = separator.clone();

@ -45,13 +45,7 @@ struct Args {
secondary_location: Option<PathBuf>,
/// 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,

Loading…
Cancel
Save