mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
Everywhere: Avoid calling from_utf8 on FlyString or String
We already have a String :^)
This commit is contained in:
committed by
Andreas Kling
parent
55ec1cbfb5
commit
6ce0d588ee
@@ -295,8 +295,8 @@ Parser::ParseErrorOr<Selector::SimpleSelector> Parser::parse_attribute_simple_se
|
||||
dbgln_if(CSS_PARSER_DEBUG, "Expected a string or ident for the value to match attribute against, got: '{}'", value_part.to_debug_string());
|
||||
return ParseError::SyntaxError;
|
||||
}
|
||||
auto value_string_view = value_part.token().is(Token::Type::Ident) ? value_part.token().ident() : value_part.token().string();
|
||||
simple_selector.attribute().value = String::from_utf8(value_string_view).release_value_but_fixme_should_propagate_errors();
|
||||
auto const& value_string = value_part.token().is(Token::Type::Ident) ? value_part.token().ident() : value_part.token().string();
|
||||
simple_selector.attribute().value = value_string.to_string();
|
||||
|
||||
attribute_tokens.skip_whitespace();
|
||||
// Handle case-sensitivity suffixes. https://www.w3.org/TR/selectors-4/#attribute-case
|
||||
|
||||
Reference in New Issue
Block a user