mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-05 17:53:48 +00:00
Applying some clippy fixes. (#5292)
This commit is contained in:
parent
39aace0c8f
commit
ffc3493abe
8 changed files with 13 additions and 13 deletions
|
@ -107,7 +107,7 @@ pub async fn create_post(
|
|||
let scheduled_publish_time =
|
||||
convert_published_time(data.scheduled_publish_time, &local_user_view, &context).await?;
|
||||
let post_form = PostInsertForm {
|
||||
url: url.map(Into::into),
|
||||
url,
|
||||
body,
|
||||
alt_text: data.alt_text.clone(),
|
||||
nsfw: data.nsfw,
|
||||
|
|
|
@ -152,7 +152,7 @@ impl ActivityHandler for BlockUser {
|
|||
#[tracing::instrument(skip_all)]
|
||||
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
||||
insert_received_activity(&self.id, context).await?;
|
||||
let expires = self.end_time.map(Into::into);
|
||||
let expires = self.end_time;
|
||||
let mod_person = self.actor.dereference(context).await?;
|
||||
let blocked_person = self.object.dereference(context).await?;
|
||||
let target = self.target.dereference(context).await?;
|
||||
|
|
|
@ -100,7 +100,7 @@ impl ActivityHandler for UndoBlockUser {
|
|||
#[tracing::instrument(skip_all)]
|
||||
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
||||
insert_received_activity(&self.id, context).await?;
|
||||
let expires = self.object.end_time.map(Into::into);
|
||||
let expires = self.object.end_time;
|
||||
let mod_person = self.actor.dereference(context).await?;
|
||||
let blocked_person = self.object.object.dereference(context).await?;
|
||||
match self.object.target.dereference(context).await? {
|
||||
|
|
|
@ -98,8 +98,8 @@ impl ActivityHandler for UpdateCommunity {
|
|||
&None,
|
||||
&self.object.source,
|
||||
)),
|
||||
published: self.object.published.map(Into::into),
|
||||
updated: Some(self.object.updated.map(Into::into)),
|
||||
published: self.object.published,
|
||||
updated: Some(self.object.updated),
|
||||
nsfw: Some(self.object.sensitive.unwrap_or(false)),
|
||||
actor_id: Some(self.object.id.into()),
|
||||
public_key: Some(self.object.public_key.public_key_pem),
|
||||
|
|
|
@ -194,8 +194,8 @@ impl Object for ApubComment {
|
|||
post_id: post.id,
|
||||
content,
|
||||
removed: None,
|
||||
published: note.published.map(Into::into),
|
||||
updated: note.updated.map(Into::into),
|
||||
published: note.published,
|
||||
updated: note.updated,
|
||||
deleted: Some(false),
|
||||
ap_id: Some(note.id.into()),
|
||||
distinguished: note.distinguished,
|
||||
|
|
|
@ -167,8 +167,8 @@ impl Object for ApubPerson {
|
|||
deleted: Some(false),
|
||||
avatar,
|
||||
banner,
|
||||
published: person.published.map(Into::into),
|
||||
updated: person.updated.map(Into::into),
|
||||
published: person.published,
|
||||
updated: person.updated,
|
||||
actor_id: Some(person.id.into()),
|
||||
bio,
|
||||
local: Some(false),
|
||||
|
|
|
@ -249,8 +249,8 @@ impl Object for ApubPost {
|
|||
url: url.map(Into::into),
|
||||
body,
|
||||
alt_text,
|
||||
published: page.published.map(Into::into),
|
||||
updated: page.updated.map(Into::into),
|
||||
published: page.published,
|
||||
updated: page.updated,
|
||||
deleted: Some(false),
|
||||
nsfw: page.sensitive,
|
||||
ap_id: Some(page.id.clone().into()),
|
||||
|
|
|
@ -166,8 +166,8 @@ impl Object for ApubPrivateMessage {
|
|||
creator_id: creator.id,
|
||||
recipient_id: recipient.id,
|
||||
content,
|
||||
published: note.published.map(Into::into),
|
||||
updated: note.updated.map(Into::into),
|
||||
published: note.published,
|
||||
updated: note.updated,
|
||||
deleted: Some(false),
|
||||
read: None,
|
||||
ap_id: Some(note.id.into()),
|
||||
|
|
Loading…
Reference in a new issue