diff --git a/fastgmad-lib/src/create/mod.rs b/fastgmad-lib/src/create/mod.rs index cfe98f4..57aa2fb 100644 --- a/fastgmad-lib/src/create/mod.rs +++ b/fastgmad-lib/src/create/mod.rs @@ -1,6 +1,6 @@ use crate::{ error::{fastgmad_error, fastgmad_io_error, FastGmadError}, - util::{WriteEx, self}, + util::{self, WriteEx}, whitelist, }; use std::{ diff --git a/fastgmad-lib/src/util.rs b/fastgmad-lib/src/util.rs index 8f5f901..b5ab97d 100644 --- a/fastgmad-lib/src/util.rs +++ b/fastgmad-lib/src/util.rs @@ -1,9 +1,13 @@ -use std::{io::{BufRead, Write}, path::Path}; +use std::{ + io::{BufRead, Write}, + path::Path, +}; pub fn is_hidden_file(path: &Path) -> Result { let hidden; - #[cfg(unix)] { + #[cfg(unix)] + { if let Some(file_name) = path.file_name() { use std::os::unix::prelude::OsStrExt; hidden = file_name.as_bytes().starts_with(b"."); @@ -12,7 +16,8 @@ pub fn is_hidden_file(path: &Path) -> Result { } } - #[cfg(windows)] { + #[cfg(windows)] + { use std::os::windows::fs::MetadataExt; const HIDDEN: u32 = 0x00000002; hidden = std::fs::metadata(path)?.file_attributes() & HIDDEN != 0;