]> Untitled Git - lemmy.git/commitdiff
Remove unwrap
authorFelix Ableitner <me@nutomic.com>
Mon, 14 Nov 2022 14:30:44 +0000 (15:30 +0100)
committerFelix Ableitner <me@nutomic.com>
Mon, 14 Nov 2022 14:30:44 +0000 (15:30 +0100)
crates/apub/src/activities/community/announce.rs

index f99a650fba592c4b5532ae232d7ec0b2c77cca0f..9c1b752a6c8ba2820d1990e9910bba46c852ae87 100644 (file)
@@ -119,7 +119,10 @@ impl AnnounceActivity {
       let announcable_page = RawAnnouncableActivities {
         id: c.object.id.clone().into_inner(),
         actor: c.actor.clone().into_inner(),
-        other: serde_json::to_value(c.object)?.as_object().unwrap().clone(),
+        other: serde_json::to_value(c.object)?
+          .as_object()
+          .expect("is object")
+          .clone(),
       };
       let announce_compat = AnnounceActivity::new(announcable_page, community, context)?;
       send_lemmy_activity(context, announce_compat, community, inboxes, false).await?;