mirror of
https://github.com/RGBCube/serenity
synced 2025-06-29 03:52:12 +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
|
@ -199,8 +199,8 @@ Tokenizer::Tokenizer(StringView input, StringView encoding)
|
|||
{
|
||||
// https://www.w3.org/TR/css-syntax-3/#css-filter-code-points
|
||||
auto filter_code_points = [](StringView input, auto encoding) -> ErrorOr<String> {
|
||||
auto* decoder = TextCodec::decoder_for(encoding);
|
||||
VERIFY(decoder);
|
||||
auto decoder = TextCodec::decoder_for(encoding);
|
||||
VERIFY(decoder.has_value());
|
||||
|
||||
StringBuilder builder { input.length() };
|
||||
bool last_was_carriage_return = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue