1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibTextCodec+Everywhere: Make TextCodec::decoder_for() take a StringView

We don't need a full String/DeprecatedString inside this function, so we
might as well not force users to create one.
This commit is contained in:
Sam Atkins 2023-02-13 17:23:31 +00:00 committed by Tim Flynn
parent 3c8bfa4662
commit d6075ef5b5
14 changed files with 16 additions and 16 deletions

View file

@ -81,7 +81,7 @@ static DeprecatedString mime_type_from_content_type(DeprecatedString const& cont
return content_type;
}
static bool is_valid_encoding(DeprecatedString const& encoding)
static bool is_valid_encoding(StringView encoding)
{
return TextCodec::decoder_for(encoding);
}