1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibTextCodec+Everywhere: Return Optional<Decoder&> from decoder_for()

This commit is contained in:
Sam Atkins 2023-02-17 17:45:08 +00:00 committed by Andreas Kling
parent 2f4c463920
commit f2a9426885
16 changed files with 42 additions and 39 deletions

View file

@ -83,7 +83,7 @@ static DeprecatedString mime_type_from_content_type(DeprecatedString const& cont
static bool is_valid_encoding(StringView encoding)
{
return TextCodec::decoder_for(encoding);
return TextCodec::decoder_for(encoding).has_value();
}
void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code)