Skip to content

Commit

Permalink
Simplify the declaration
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Hofstetter <[email protected]>
  • Loading branch information
sylvestre and cakebaker authored May 15, 2023
1 parent 3e75946 commit 369a2a6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 369a2a6

Please sign in to comment.