From: Felix Ableitner Date: Mon, 14 Nov 2022 14:30:44 +0000 (+0100) Subject: Remove unwrap X-Git-Url: http://these/git/ui/assets/static/%7Biframely.thumbnail_url%7D?a=commitdiff_plain;h=0b86ffbdbde2b5dc3c08d583200a78595e5ed68d;p=lemmy.git Remove unwrap --- diff --git a/crates/apub/src/activities/community/announce.rs b/crates/apub/src/activities/community/announce.rs index f99a650f..9c1b752a 100644 --- a/crates/apub/src/activities/community/announce.rs +++ b/crates/apub/src/activities/community/announce.rs @@ -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?;