mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
AK: Add new failable JsonArray::{append/set}
functions
Move all old usages to the more explicit `JsonArray:must_{append/set}`
This commit is contained in:
parent
3b00636288
commit
8134dccdc7
Notes:
sideshowbarker
2024-07-17 22:01:16 +09:00
Author: https://github.com/cammo1123
Commit: 8134dccdc7
Pull-request: https://github.com/SerenityOS/serenity/pull/18409
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/krkk
14 changed files with 28 additions and 25 deletions
|
@ -202,7 +202,7 @@ ErrorOr<void> ExportDialog::make_and_run_for(StringView mime, Core::File& file,
|
|||
auto export_worksheet = [&]() -> ErrorOr<void> {
|
||||
JsonArray array;
|
||||
for (auto& sheet : workbook.sheets())
|
||||
array.append(sheet->to_json());
|
||||
array.must_append(sheet->to_json());
|
||||
|
||||
auto file_content = array.to_deprecated_string();
|
||||
return file.write_until_depleted(file_content.bytes());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue