From 22d29ccc521802b7d699afdf123330f418d92a9a Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Thu, 25 Nov 2021 23:28:31 +0000 Subject: [PATCH] tidy up dir stuff --- src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3388a92..f69c8d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 {