mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 14:48:15 +00:00
AK: Remove must_set() from JsonArray
Due to 582c55a, both `must_set()` and `set()` should be providing the
same behavior. Not only is that a reason to remove `must_set()`, but
it also performs erroneous behavior since it inserts an element at
a specified index instead of modifying an element at that index.
This commit is contained in:
committed by
Andreas Kling
parent
c7e08c3266
commit
eda2a2f5da
@@ -62,7 +62,6 @@ public:
|
||||
[[nodiscard]] JsonValue take(size_t index) { return m_values.take(index); }
|
||||
|
||||
void must_append(JsonValue value) { m_values.append(move(value)); }
|
||||
void must_set(size_t index, JsonValue value) { m_values.insert(index, move(value)); }
|
||||
|
||||
void clear() { m_values.clear(); }
|
||||
ErrorOr<void> append(JsonValue value) { return m_values.try_append(move(value)); }
|
||||
|
||||
Reference in New Issue
Block a user