Replace tempdir with tempfile

This commit is contained in:
Adrian Heine 2021-12-20 10:16:39 +01:00
parent 92ac0d0384
commit 52e00de3bb
3 changed files with 6 additions and 6 deletions

View file

@ -4,10 +4,10 @@ use schematics::symbols::Symbol;
use std::fs::File;
use std::io::Write;
use std::path::{Path, PathBuf};
use tempdir::TempDir;
use tempfile::{tempdir, TempDir};
fn get_dir(content: Option<&str>) -> TempDir {
let tmp_dir = TempDir::new("unittest").expect("create temp dir");
let tmp_dir = tempdir().expect("create temp dir");
if content.is_none() {
return tmp_dir;
}