1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:57:34 +00:00

LibCore+Userland: Remove uses of DeprecatedString in file utility

Mainly replacing DeprecatedString with StringView, since the actual mime
type and description texts are just static strings anyway.
This commit is contained in:
Valtteri Koskivuori 2023-02-01 21:39:31 +02:00 committed by Tim Flynn
parent 43e1343abf
commit e56098f734
5 changed files with 86 additions and 83 deletions

View file

@ -177,7 +177,7 @@ Vector<DeprecatedString> Launcher::handlers_with_details_for_url(const URL& url)
return handlers;
}
Optional<DeprecatedString> Launcher::mime_type_for_file(DeprecatedString path)
Optional<StringView> Launcher::mime_type_for_file(DeprecatedString path)
{
auto file_or_error = Core::File::open(path, Core::File::OpenMode::Read);
if (file_or_error.is_error())