tidy up dir stuff

This commit is contained in:
Max Bradbury 2021-11-25 23:28:31 +00:00
parent 0a4dbbba81
commit 22d29ccc52
1 changed files with 2 additions and 6 deletions

View File

@ -3,15 +3,11 @@ use std::io;
use std::path::PathBuf;
fn home_dir() -> PathBuf {
return dirs::home_dir().unwrap();
dirs::home_dir().expect("Couldn't find home dir")
}
fn downloads_dir() -> PathBuf {
let mut downloads = home_dir();
downloads.push("Downloads");
downloads
dirs::download_dir().expect("Couldn't find download dir")
}
fn strip_null_bytes(str: &str) -> String {