mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-14 22:10:32 +08:00
fix: clippy warnings
This commit is contained in:
parent
592e7f846d
commit
b05799cfae
@ -1,5 +1,6 @@
|
|||||||
use criterion::{Criterion, criterion_group, criterion_main};
|
use criterion::{Criterion, criterion_group, criterion_main};
|
||||||
use std::hint::black_box;
|
use std::hint::black_box;
|
||||||
|
use std::process;
|
||||||
use tokio::runtime::Runtime;
|
use tokio::runtime::Runtime;
|
||||||
|
|
||||||
// 引入业务模型 & Draft 实现
|
// 引入业务模型 & Draft 实现
|
||||||
@ -108,7 +109,10 @@ fn bench_discard(c: &mut Criterion) {
|
|||||||
|
|
||||||
/// 基准:异步 with_data_modify
|
/// 基准:异步 with_data_modify
|
||||||
fn bench_with_data_modify(c: &mut Criterion) {
|
fn bench_with_data_modify(c: &mut Criterion) {
|
||||||
let rt = Runtime::new().unwrap();
|
let rt = Runtime::new().unwrap_or_else(|error| {
|
||||||
|
eprintln!("draft benchmarks require a Tokio runtime: {error}");
|
||||||
|
process::exit(1);
|
||||||
|
});
|
||||||
|
|
||||||
c.bench_function("draft_with_data_modify", |b| {
|
c.bench_function("draft_with_data_modify", |b| {
|
||||||
b.to_async(&rt).iter(|| async {
|
b.to_async(&rt).iter(|| async {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user