Simplify the declaration

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
Sylvestre Ledru 2023-05-15 10:12:28 +02:00 committed by GitHub
parent 3e7594632b
commit 369a2a6631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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