SpaceAnalyzer: Replace uses of JsonObject::get_deprecated()/get_ptr()

This commit is contained in:
Sam Atkins 2022-12-21 19:55:43 +00:00 committed by Tim Flynn
parent 74452ffc50
commit c84e11c154
Notes: sideshowbarker 2024-07-17 03:30:41 +09:00

View file

@ -45,8 +45,8 @@ static ErrorOr<void> fill_mounts(Vector<MountInfo>& output)
TRY(json.as_array().try_for_each([&output](JsonValue const& value) -> ErrorOr<void> {
auto& filesystem_object = value.as_object();
MountInfo mount_info;
mount_info.mount_point = filesystem_object.get_deprecated("mount_point"sv).to_deprecated_string();
mount_info.source = filesystem_object.get_deprecated("source"sv).as_string_or("none"sv);
mount_info.mount_point = filesystem_object.get_deprecated_string("mount_point"sv).value_or({});
mount_info.source = filesystem_object.get_deprecated_string("source"sv).value_or("none");
TRY(output.try_append(mount_info));
return {};
}));