tidy up dir stuff
This commit is contained in:
parent
0a4dbbba81
commit
22d29ccc52
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue