From 0b86ffbdbde2b5dc3c08d583200a78595e5ed68d Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 14 Nov 2022 15:30:44 +0100 Subject: [PATCH] Remove unwrap --- crates/apub/src/activities/community/announce.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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?; -- 2.44.1