Fix clippy error

This commit is contained in:
Felix Ableitner 2021-11-08 13:11:24 +01:00
parent 888e683856
commit 252d87d332
3 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ impl ActivityHandler for UpdateCommunity {
) -> Result<(), LemmyError> { ) -> Result<(), LemmyError> {
let community = self.get_community(context, request_counter).await?; 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 { let cf = CommunityForm {
name: updated_community.name, name: updated_community.name,
title: updated_community.title, title: updated_community.title,

View File

@ -139,7 +139,7 @@ impl ApubObject for ApubCommunity {
context: &LemmyContext, context: &LemmyContext,
request_counter: &mut i32, request_counter: &mut i32,
) -> Result<ApubCommunity, LemmyError> { ) -> 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, // 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. // we need to ignore these errors so that tests can work entirely offline.

View File

@ -68,8 +68,8 @@ impl Group {
Ok(()) Ok(())
} }
pub(crate) fn into_form(self) -> Result<CommunityForm, LemmyError> { pub(crate) fn into_form(self) -> CommunityForm {
Ok(CommunityForm { CommunityForm {
name: self.preferred_username, name: self.preferred_username,
title: self.name, title: self.name,
description: get_summary_from_string_or_source(&self.summary, &self.source), description: get_summary_from_string_or_source(&self.summary, &self.source),
@ -88,6 +88,6 @@ impl Group {
followers_url: Some(self.followers.into()), followers_url: Some(self.followers.into()),
inbox_url: Some(self.inbox.into()), inbox_url: Some(self.inbox.into()),
shared_inbox_url: Some(self.endpoints.shared_inbox.map(|s| s.into())), shared_inbox_url: Some(self.endpoints.shared_inbox.map(|s| s.into())),
}) }
} }
} }