Skip to content

Commit ab8af51

Browse files
committed
Fix lints
1 parent 81e26d4 commit ab8af51

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

relay-threading/src/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ use crate::pool::{CustomSpawn, DefaultSpawn, ThreadSpawn};
1313
pub struct AsyncPoolBuilder<S = DefaultSpawn> {
1414
pub(crate) runtime: tokio::runtime::Handle,
1515
pub(crate) thread_name: Option<Box<dyn FnMut(usize) -> String>>,
16+
#[allow(clippy::type_complexity)]
1617
pub(crate) thread_panic_handler: Option<Arc<dyn Fn(Box<dyn Any + Send>) + Send + Sync>>,
18+
#[allow(clippy::type_complexity)]
1719
pub(crate) task_panic_handler: Option<Arc<dyn Fn(Box<dyn Any + Send>) + Send + Sync>>,
1820
pub(crate) spawn_handler: S,
1921
pub(crate) num_threads: usize,

relay-threading/src/multiplexing.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ impl<F> Tasks<F> {
2727
/// Initializes a new [`Tasks`] collection for managing asynchronous tasks.
2828
///
2929
/// This collection is used internally by [`Multiplexed`] to schedule task execution.
30+
#[allow(clippy::type_complexity)]
3031
fn new(panic_handler: Option<Arc<dyn Fn(Box<dyn Any + Send>) + Send + Sync>>) -> Self {
3132
Self {
3233
futures: FuturesUnordered::new(),
@@ -119,6 +120,7 @@ where
119120
///
120121
/// This multiplexer should be awaited until completion, at which point all submitted tasks
121122
/// will have been executed.
123+
#[allow(clippy::type_complexity)]
122124
pub fn new(
123125
max_concurrency: usize,
124126
rx: S,

relay-threading/src/pool.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ pub struct Thread {
8989
max_concurrency: usize,
9090
name: Option<String>,
9191
runtime: tokio::runtime::Handle,
92+
#[allow(clippy::type_complexity)]
9293
panic_handler: Option<Arc<dyn Fn(Box<dyn Any + Send>) + Send + Sync>>,
9394
task: BoxFuture<'static, ()>,
9495
}
@@ -353,6 +354,6 @@ mod tests {
353354
}
354355
.run();
355356

356-
assert_eq!(has_panicked.load(Ordering::SeqCst), true);
357+
assert!(has_panicked.load(Ordering::SeqCst));
357358
}
358359
}

0 commit comments

Comments
 (0)