From 6d0bd40a73bb95f3da786f1db1476a983b558590 Mon Sep 17 00:00:00 2001 From: Ettore Ricci Date: Thu, 23 May 2024 20:11:40 +0200 Subject: [PATCH] fix: clippy warning removed unnecessary return --- src/app/files/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/files/path.rs b/src/app/files/path.rs index ca680e4..f92ce30 100644 --- a/src/app/files/path.rs +++ b/src/app/files/path.rs @@ -63,7 +63,7 @@ pub fn diff<'a>(full_path: &'a str, prefix_path: &str) -> &'a str { if full_path == prefix_path { - return "."; + "." } else if let Some(unprefixed_path) = full_path.strip_prefix(prefix_path) { @@ -73,7 +73,7 @@ pub fn diff<'a>(full_path: &'a str, prefix_path: &str) -> &'a str { if unprefixed_path_reverse_logic.split(|c| c == '/' || c == '\\').filter(|s|!s.is_empty()).count() == 1 { - return ".."; + ".." } else {