chiark / gitweb /
Self-reference to subthings via Box
authorSimon Tatham <anakin@pobox.com>
Sat, 23 Dec 2023 10:16:33 +0000 (10:16 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 23 Dec 2023 10:16:33 +0000 (10:16 +0000)
src/main.rs

index 4d0653686927e96012de5f44fd174b418ebd7255..bb334a8a358a735e772d870b1fcb965a35572d4d 100644 (file)
@@ -1,5 +1,6 @@
 use serde::{Deserialize, Serialize};
 use serde_json::Result;
+use std::boxed::Box;
 use std::option::Option;
 
 #[derive(Serialize, Deserialize, Debug)]
@@ -21,7 +22,7 @@ struct Account {
     group: bool,
     discoverable: Option<bool>,
     noindex: Option<bool>,
-    // moved: Option<Account> (!),
+    moved: Option<Box<Account>>,
     suspended: Option<bool>,
     limited: Option<bool>,
     created_at: String, // FIXME: sort out dates!
@@ -52,7 +53,7 @@ struct Status {
     url: String,
     in_reply_to_id: Option<String>,
     in_reply_to_account_id: Option<String>,
-    // reblog: Option<Status> (!),
+    reblog: Option<Box<Status>>,
     // poll: Option<Poll>,
     // card: Option<PreviewCard>,
     language: Option<String>,