diff --git a/crates/pacdef_core/src/config.rs b/crates/pacdef_core/src/config.rs index c9b09c8..6ee903d 100644 --- a/crates/pacdef_core/src/config.rs +++ b/crates/pacdef_core/src/config.rs @@ -1,4 +1,4 @@ -use std::fs::{read_to_string, File}; +use std::fs::{create_dir_all, read_to_string, File}; use std::io::{ErrorKind, Write}; use std::path::Path; @@ -49,7 +49,7 @@ impl Config { let parent = file.parent().context("getting parent of config dir")?; if !parent.is_dir() { - std::fs::create_dir_all(parent) + create_dir_all(parent) .with_context(|| format!("creating dir {}", parent.to_string_lossy()))?; } diff --git a/crates/pacdef_core/src/grouping/group.rs b/crates/pacdef_core/src/grouping/group.rs index 5d2a39e..9bc3c99 100644 --- a/crates/pacdef_core/src/grouping/group.rs +++ b/crates/pacdef_core/src/grouping/group.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; use std::fmt::Display; -use std::fs::{read_to_string, File}; +use std::fs::{create_dir, read_to_string, File}; use std::hash::Hash; use std::io::Write; use std::path::{Path, PathBuf}; @@ -36,7 +36,7 @@ impl Group { if !group_dir.is_dir() { // we only need to create the innermost dir. The rest was already created from when // we loaded the config - std::fs::create_dir(group_dir) + create_dir(group_dir) .with_context(|| format!("creating group dir {}", group_dir.to_string_lossy()))?; }