tidy up dir stuff
This commit is contained in:
parent
0a4dbbba81
commit
22d29ccc52
|
@ -3,15 +3,11 @@ use std::io;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn home_dir() -> PathBuf {
|
fn home_dir() -> PathBuf {
|
||||||
return dirs::home_dir().unwrap();
|
dirs::home_dir().expect("Couldn't find home dir")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn downloads_dir() -> PathBuf {
|
fn downloads_dir() -> PathBuf {
|
||||||
let mut downloads = home_dir();
|
dirs::download_dir().expect("Couldn't find download dir")
|
||||||
|
|
||||||
downloads.push("Downloads");
|
|
||||||
|
|
||||||
downloads
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn strip_null_bytes(str: &str) -> String {
|
fn strip_null_bytes(str: &str) -> String {
|
||||||
|
|
Loading…
Reference in New Issue