We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bd0fb0 commit 3d59ccfCopy full SHA for 3d59ccf
src/lib.rs
@@ -33,10 +33,14 @@ struct TempDirGuard(PathBuf);
33
34
impl Drop for TempDirGuard {
35
fn drop(&mut self) {
36
- let rt = tokio::runtime::Builder::new_current_thread()
+ let Ok(rt) = tokio::runtime::Builder::new_current_thread()
37
.enable_all()
38
.build()
39
- .unwrap();
+ else {
40
+ error!("cannot create tokio runtime");
41
+ return;
42
+ };
43
+
44
rt.block_on(async {
45
if let Err(e) = remove_dir_all(self.0.clone()).await {
46
error!("cannot remove tmp dir: {e}")
0 commit comments