clean code

This commit is contained in:
grimhilt
2023-08-11 22:09:34 +02:00
parent 5b46b1e2f1
commit dcf137667b
4 changed files with 32 additions and 28 deletions

View File

@@ -133,3 +133,11 @@ pub fn nextsyncignore() -> Option<PathBuf> {
None
}
}
pub fn path_buf_to_string(p: PathBuf) -> String {
if let Some(str) = p.to_str() {
str.to_string()
} else {
String::new()
}
}