Skip to content

Commit 4776548

Browse files
committed
code polish
1 parent 82afe01 commit 4776548

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/co_pool/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ impl Drop for CoroutinePool<'_> {
6060
if std::thread::panicking() {
6161
return;
6262
}
63-
self.stop(Duration::from_secs(30))
64-
.unwrap_or_else(|_| panic!("Failed to stop coroutine pool {} !", self.name()));
63+
self.stop(Duration::from_secs(30)).unwrap_or_else(|e| {
64+
panic!("Failed to stop coroutine pool {} due to {e} !", self.name())
65+
});
6566
assert_eq!(
6667
PoolState::Stopped,
6768
self.state(),

0 commit comments

Comments
 (0)