From 6e3d4a76efa35d98dfc92e7287d0ffff88c063b9 Mon Sep 17 00:00:00 2001 From: phoenix Date: Sat, 28 Jun 2025 17:00:39 -0400 Subject: [PATCH] Improvements to util module --- src/util.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/util.rs b/src/util.rs index 77a0b4e..3a873bc 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,8 +1,6 @@ -pub fn path_buf_to_string(path: &std::path::PathBuf) -> String { - let s_path = match path.to_str() { +pub fn path_buf_to_string(path: &std::path::Path) -> String { + match path.to_str() { Some(val) => String::from(val), None => String::new(), - }; - - s_path + } }