From 369a2a66314ab6f76e3ac2176edb0c0d6b5e9964 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 15 May 2023 10:12:28 +0200 Subject: [PATCH] Simplify the declaration Co-authored-by: Daniel Hofstetter --- src/uu/ls/src/ls.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index 5e3a5a078..e5ad4bcd4 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -2001,10 +2001,7 @@ fn should_display(entry: &DirEntry, config: &Config) -> bool { // If the decoding fails, still show an incorrect rendering let file_name = match file_name.to_str() { Some(s) => s.to_string(), - None => { - let file_name_bytes = file_name.to_string_lossy(); - file_name_bytes.into_owned() - } + None => file_name.to_string_lossy().into_owned(), }; !config .ignore_patterns