mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Use JsonArray::append when parsing array
This commit is contained in:
committed by
Andreas Kling
parent
8134dccdc7
commit
ada6dbf636
@@ -164,7 +164,7 @@ ErrorOr<JsonValue> JsonParser::parse_array()
|
|||||||
if (peek() == ']')
|
if (peek() == ']')
|
||||||
break;
|
break;
|
||||||
auto element = TRY(parse_helper());
|
auto element = TRY(parse_helper());
|
||||||
array.must_append(move(element));
|
TRY(array.append(move(element)));
|
||||||
ignore_while(is_space);
|
ignore_while(is_space);
|
||||||
if (peek() == ']')
|
if (peek() == ']')
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user