1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00

file: Remove unnecessary DeprecatedString ctor call

path is already a DeprecatedString.
This commit is contained in:
Nico Weber 2023-02-26 18:08:27 -05:00 committed by Linus Groh
parent b87b1472e1
commit 9f5343e29e

View file

@ -189,7 +189,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto bytes = TRY(file->read(buffer));
auto file_name_guess = Core::guess_mime_type_based_on_filename(path);
auto mime_type = Core::guess_mime_type_based_on_sniffed_bytes(bytes).value_or(file_name_guess);
auto human_readable_description = get_description_from_mime_type(mime_type, DeprecatedString(path)).value_or(mime_type);
auto human_readable_description = get_description_from_mime_type(mime_type, path).value_or(mime_type);
outln("{}: {}", path, flag_mime_only ? mime_type : human_readable_description);
}
}