1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWeb: Empend instead of Appending DeclarationOrAtRules

This commit is contained in:
Sam Atkins 2022-04-12 16:22:22 +01:00 committed by Andreas Kling
parent 782cdd6b91
commit 128d08ecef

View file

@ -2049,7 +2049,7 @@ Vector<DeclarationOrAtRule> Parser::consume_a_list_of_declarations(TokenStream<T
tokens.reconsume_current_input_token();
// Consume an at-rule. Append the returned rule to the list of declarations.
list_of_declarations.append(DeclarationOrAtRule(consume_an_at_rule(tokens)));
list_of_declarations.empend(consume_an_at_rule(tokens));
continue;
}
@ -2071,7 +2071,7 @@ Vector<DeclarationOrAtRule> Parser::consume_a_list_of_declarations(TokenStream<T
// Consume a declaration from the temporary list. If anything was returned, append it to the list of declarations.
auto token_stream = TokenStream(temporary_list);
if (auto maybe_declaration = consume_a_declaration(token_stream); maybe_declaration.has_value())
list_of_declarations.append(DeclarationOrAtRule(maybe_declaration.value()));
list_of_declarations.empend(maybe_declaration.value());
continue;
}