mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
lints: use rust-2018-idioms to eliminate #![allow(elided-lifetimes-in-paths)] (#5944)
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
#![allow(missing_docs, elided_lifetimes_in_paths)]
|
#![allow(missing_docs)]
|
||||||
use criterion::{
|
use criterion::{
|
||||||
async_executor::FuturesExecutor, criterion_group, criterion_main, measurement::WallTime,
|
async_executor::FuturesExecutor, criterion_group, criterion_main, measurement::WallTime,
|
||||||
BenchmarkGroup, Criterion,
|
BenchmarkGroup, Criterion,
|
||||||
@ -116,7 +116,7 @@ fn merkle(c: &mut Criterion) {
|
|||||||
|
|
||||||
fn measure_stage_with_path<F, S>(
|
fn measure_stage_with_path<F, S>(
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
group: &mut BenchmarkGroup<WallTime>,
|
group: &mut BenchmarkGroup<'_, WallTime>,
|
||||||
setup: F,
|
setup: F,
|
||||||
stage: S,
|
stage: S,
|
||||||
stage_range: StageRange,
|
stage_range: StageRange,
|
||||||
@ -149,7 +149,7 @@ fn measure_stage_with_path<F, S>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn measure_stage<F, S>(
|
fn measure_stage<F, S>(
|
||||||
group: &mut BenchmarkGroup<WallTime>,
|
group: &mut BenchmarkGroup<'_, WallTime>,
|
||||||
setup: F,
|
setup: F,
|
||||||
stage: S,
|
stage: S,
|
||||||
block_interval: std::ops::Range<u64>,
|
block_interval: std::ops::Range<u64>,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#![allow(missing_docs, elided_lifetimes_in_paths)]
|
#![allow(missing_docs)]
|
||||||
use criterion::{
|
use criterion::{
|
||||||
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
||||||
};
|
};
|
||||||
@ -52,7 +52,7 @@ pub fn serialization(c: &mut Criterion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Measures `Encode`, `Decode`, `Compress` and `Decompress`.
|
/// Measures `Encode`, `Decode`, `Compress` and `Decompress`.
|
||||||
fn measure_table_serialization<T>(group: &mut BenchmarkGroup<WallTime>)
|
fn measure_table_serialization<T>(group: &mut BenchmarkGroup<'_, WallTime>)
|
||||||
where
|
where
|
||||||
T: Table + Default,
|
T: Table + Default,
|
||||||
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
|
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
|
||||||
@ -117,7 +117,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Measures `SeqWrite`, `RandomWrite`, `SeqRead` and `RandomRead` using `cursor` and `tx.put`.
|
/// Measures `SeqWrite`, `RandomWrite`, `SeqRead` and `RandomRead` using `cursor` and `tx.put`.
|
||||||
fn measure_table_db<T>(group: &mut BenchmarkGroup<WallTime>)
|
fn measure_table_db<T>(group: &mut BenchmarkGroup<'_, WallTime>)
|
||||||
where
|
where
|
||||||
T: Table + Default,
|
T: Table + Default,
|
||||||
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
|
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
|
||||||
@ -213,7 +213,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Measures `SeqWrite`, `RandomWrite` and `SeqRead` using `cursor_dup` and `tx.put`.
|
/// Measures `SeqWrite`, `RandomWrite` and `SeqRead` using `cursor_dup` and `tx.put`.
|
||||||
fn measure_dupsort_db<T>(group: &mut BenchmarkGroup<WallTime>)
|
fn measure_dupsort_db<T>(group: &mut BenchmarkGroup<'_, WallTime>)
|
||||||
where
|
where
|
||||||
T: Table + Default + DupSort,
|
T: Table + Default + DupSort,
|
||||||
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
|
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#![allow(missing_docs, elided_lifetimes_in_paths)]
|
#![allow(missing_docs)]
|
||||||
use criterion::{
|
use criterion::{
|
||||||
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
||||||
};
|
};
|
||||||
@ -38,7 +38,7 @@ pub fn hash_keys(c: &mut Criterion) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn measure_table_insertion<T>(group: &mut BenchmarkGroup<WallTime>, size: usize)
|
fn measure_table_insertion<T>(group: &mut BenchmarkGroup<'_, WallTime>, size: usize)
|
||||||
where
|
where
|
||||||
T: Table + Default,
|
T: Table + Default,
|
||||||
T::Key: Default
|
T::Key: Default
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#![allow(missing_docs, unreachable_pub, elided_lifetimes_in_paths)]
|
#![allow(missing_docs, unreachable_pub)]
|
||||||
use criterion::{
|
use criterion::{
|
||||||
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
black_box, criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
||||||
};
|
};
|
||||||
@ -58,7 +58,7 @@ pub fn prefix_set_lookups(c: &mut Criterion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn prefix_set_bench<T: PrefixSetAbstraction>(
|
fn prefix_set_bench<T: PrefixSetAbstraction>(
|
||||||
group: &mut BenchmarkGroup<WallTime>,
|
group: &mut BenchmarkGroup<'_, WallTime>,
|
||||||
description: &str,
|
description: &str,
|
||||||
(preload, input, expected): (Vec<Nibbles>, Vec<Nibbles>, Vec<bool>),
|
(preload, input, expected): (Vec<Nibbles>, Vec<Nibbles>, Vec<bool>),
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user