Skip to content

Commit 08018e7

Browse files
authored
paranthesis lints (kaspanet#732)
1 parent 9ff5d0f commit 08018e7

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

metrics/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use workflow_core::time::unixtime_as_millis_f64;
2020
use workflow_log::*;
2121

2222
pub type MetricsSinkFn =
23-
Arc<Box<dyn Send + Sync + Fn(MetricsSnapshot) -> Option<Pin<Box<(dyn Send + 'static + Future<Output = Result<()>>)>>> + 'static>>;
23+
Arc<Box<dyn Send + Sync + Fn(MetricsSnapshot) -> Option<Pin<Box<dyn Send + 'static + Future<Output = Result<()>>>>> + 'static>>;
2424

2525
pub struct Metrics {
2626
task_ctl: DuplexChannel,

mining/benches/bench.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ pub fn bench_compare_topological_index_fns(c: &mut Criterion) {
6969
let mut group = c.benchmark_group("compare fns");
7070
group.bench_function("TopologicalIndex::topological_index", |b| {
7171
let dag = build_dag();
72-
b.iter(|| (black_box(dag.topological_index())))
72+
b.iter(|| black_box(dag.topological_index()))
7373
});
7474
group.bench_function("TopologicalIndex::topological_index_dfs", |b| {
7575
let dag = build_dag();
76-
b.iter(|| (black_box(dag.topological_index_dfs())))
76+
b.iter(|| black_box(dag.topological_index_dfs()))
7777
});
7878
group.finish();
7979
}

notify/benches/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ADDRESS_COUNT: usize = 1_000_000;
2121
pub fn bench_subscription_context(c: &mut Criterion) {
2222
c.bench_function("create_and_fill_context", |b| {
2323
let addresses = create_addresses(ADDRESS_COUNT);
24-
b.iter(|| (black_box(create_and_fill_context(addresses.clone()))))
24+
b.iter(|| black_box(create_and_fill_context(addresses.clone())))
2525
});
2626
}
2727

notify/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use async_channel::{RecvError, SendError, TrySendError};
22
use thiserror::Error;
33

4-
pub type BoxedStdError = Box<(dyn std::error::Error + Sync + std::marker::Send + 'static)>;
4+
pub type BoxedStdError = Box<dyn std::error::Error + Sync + std::marker::Send + 'static>;
55

66
#[derive(Clone, Debug, Error)]
77
pub enum Error {

protocol/mining/src/rule_engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl MiningRuleEngine {
9999
mining_rules: Arc<MiningRules>,
100100
) -> Self {
101101
let use_sync_rate_rule = Arc::new(AtomicBool::new(false));
102-
let rules: Vec<Arc<(dyn MiningRule + 'static)>> = vec![Arc::new(SyncRateRule::new(use_sync_rate_rule.clone()))];
102+
let rules: Vec<Arc<dyn MiningRule + 'static>> = vec![Arc::new(SyncRateRule::new(use_sync_rate_rule.clone()))];
103103

104104
Self { consensus_manager, config, processing_counters, tick_service, hub, use_sync_rate_rule, mining_rules, rules }
105105
}

rpc/grpc/client/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use kaspa_notify::error::Error as NotifyError;
22
use kaspa_rpc_core::RpcError;
33
use thiserror::Error;
44

5-
pub type BoxedStdError = Box<(dyn std::error::Error + Sync + std::marker::Send + 'static)>;
5+
pub type BoxedStdError = Box<dyn std::error::Error + Sync + std::marker::Send + 'static>;
66

77
#[derive(Debug, Error)]
88
pub enum Error {

rpc/grpc/server/src/request_handler/method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub type MethodFn<ServerContext, ConnectionContext, Request, Response> =
3333
Arc<Box<dyn Send + Sync + Fn(ServerContext, ConnectionContext, Request) -> MethodFnReturn<Response> + 'static>>;
3434

3535
/// RPC method function return type
36-
pub type MethodFnReturn<T> = Pin<Box<(dyn Send + 'static + Future<Output = GrpcServerResult<T>>)>>;
36+
pub type MethodFnReturn<T> = Pin<Box<dyn Send + 'static + Future<Output = GrpcServerResult<T>>>>;
3737

3838
/// RPC drop function type
3939
pub type DropFn<Request, Response> = Arc<Box<dyn Send + Sync + Fn(&Request) -> GrpcServerResult<Response>>>;

0 commit comments

Comments
 (0)