Use tempfile (#1980)

This commit is contained in:
LoveSy
2024-08-15 16:28:05 +08:00
committed by GitHub
parent 2dac1c701c
commit bbc31bdbca
4 changed files with 59 additions and 87 deletions

View File

@@ -206,7 +206,7 @@ fn find_temp_path() -> String {
}
// Try to create a random directory in /dev/
let r = tempdir::TempDir::new_in("/dev/", "");
let r = tempfile::tempdir_in("/dev/");
match r {
Ok(tmp_dir) => {
if let Some(path) = tmp_dir.into_path().to_str() {