Skip to content

Commit 3d59ccf

Browse files
committed
qa
Signed-off-by: Jan Zachmann <[email protected]>
1 parent 6bd0fb0 commit 3d59ccf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ struct TempDirGuard(PathBuf);
3333

3434
impl Drop for TempDirGuard {
3535
fn drop(&mut self) {
36-
let rt = tokio::runtime::Builder::new_current_thread()
36+
let Ok(rt) = tokio::runtime::Builder::new_current_thread()
3737
.enable_all()
3838
.build()
39-
.unwrap();
39+
else {
40+
error!("cannot create tokio runtime");
41+
return;
42+
};
43+
4044
rt.block_on(async {
4145
if let Err(e) = remove_dir_all(self.0.clone()).await {
4246
error!("cannot remove tmp dir: {e}")

0 commit comments

Comments
 (0)