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:
parent
2f4c463920
commit
f2a9426885
16 changed files with 42 additions and 39 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue