]> Untitled Git - lemmy.git/commitdiff
Fix clippy error
authorFelix Ableitner <me@nutomic.com>
Mon, 8 Nov 2021 12:11:24 +0000 (13:11 +0100)
committerFelix Ableitner <me@nutomic.com>
Mon, 8 Nov 2021 12:16:14 +0000 (13:16 +0100)
crates/apub/src/activities/community/update.rs
crates/apub/src/objects/community.rs
crates/apub/src/protocol/objects/group.rs

index b4ffb7fc63df573299b45a87e7e2c0a8dd8a829c..cc82c9e310d76f44ec15f2db268b2a2d35e8daaa 100644 (file)
@@ -80,7 +80,7 @@ impl ActivityHandler for UpdateCommunity {
   ) -> Result<(), LemmyError> {
     let community = self.get_community(context, request_counter).await?;
 
-    let updated_community = self.object.into_form()?;
+    let updated_community = self.object.into_form();
     let cf = CommunityForm {
       name: updated_community.name,
       title: updated_community.title,
index 21ca9d4f5747f751109a5cddc2e3fda18350556d..f2fb45e4fb30899ce18684341b78c5cc9e050737 100644 (file)
@@ -139,7 +139,7 @@ impl ApubObject for ApubCommunity {
     context: &LemmyContext,
     request_counter: &mut i32,
   ) -> Result<ApubCommunity, LemmyError> {
-    let form = Group::into_form(group.clone())?;
+    let form = Group::into_form(group.clone());
 
     // Fetching mods and outbox is not necessary for Lemmy to work, so ignore errors. Besides,
     // we need to ignore these errors so that tests can work entirely offline.
index 8a6e672037eca15b26b589aa86ed521568bb50dd..4dc1c5bd1d8e9d02540b5df1d32bbede4d4b5511 100644 (file)
@@ -68,8 +68,8 @@ impl Group {
     Ok(())
   }
 
-  pub(crate) fn into_form(self) -> Result<CommunityForm, LemmyError> {
-    Ok(CommunityForm {
+  pub(crate) fn into_form(self) -> CommunityForm {
+    CommunityForm {
       name: self.preferred_username,
       title: self.name,
       description: get_summary_from_string_or_source(&self.summary, &self.source),
@@ -88,6 +88,6 @@ impl Group {
       followers_url: Some(self.followers.into()),
       inbox_url: Some(self.inbox.into()),
       shared_inbox_url: Some(self.endpoints.shared_inbox.map(|s| s.into())),
-    })
+    }
   }
 }