Skip to content

Commit

Permalink
clippy and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Apr 4, 2024
1 parent 44900b7 commit f419da8
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions commons/zenoh-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,14 @@ impl Drop for ZRuntimePool {
let handles: Vec<_> = self
.0
.drain()
.map(|(_name, mut rt)| {
rt.take().map(|r|
std::thread::spawn(move || {
r.shutdown_timeout(Duration::from_secs(1))
})
)
.filter_map(|(_name, mut rt)| {
rt.take()
.map(|r| std::thread::spawn(move || r.shutdown_timeout(Duration::from_secs(1))))
})
.collect();

for hdo in handles {
if let Some(hd) = hdo {
let _ = hd.join();
}
for hd in handles {
let _ = hd.join();
}
}
}
Expand Down

0 comments on commit f419da8

Please sign in to comment.