Skip to content

Commit 29ea021

Browse files
authored
fix: clippy (#561)
1 parent a939135 commit 29ea021

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/base/src/worker/pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,13 +664,13 @@ impl WorkerPool {
664664
let mem_checks = self
665665
.user_workers
666666
.iter()
667-
.map(|it| (it.0.clone(), it.1.mem_check.clone()))
667+
.map(|it| (*it.0, it.1.mem_check.clone()))
668668
.collect::<Vec<_>>();
669669

670670
drop(tokio::task::spawn_blocking(move || {
671671
let mut results = HashMap::new();
672672
for (uuid, mem_check) in mem_checks {
673-
results.insert(uuid, mem_check.read().ok().map(|it| it.current.clone()));
673+
results.insert(uuid, mem_check.read().ok().map(|it| it.current));
674674
}
675675

676676
let _ = tx.send(results);

crates/base/src/worker/worker_inner.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ impl std::ops::Deref for Worker {
181181
}
182182
}
183183

184+
type BooterSignalData = (MetricSource, Arc<RwLock<MemCheckState>>, CancellationToken);
185+
184186
impl Worker {
185187
pub fn start(
186188
self,
187-
booter_signal: oneshot::Sender<
188-
Result<(MetricSource, Arc<RwLock<MemCheckState>>, CancellationToken), Error>,
189-
>,
189+
booter_signal: oneshot::Sender<Result<BooterSignalData, Error>>,
190190
exit: WorkerExit,
191191
) {
192192
let worker_name = self.worker_name.clone();

0 commit comments

Comments
 (0)