mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-07 02:31:32 +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 =
|
let scheduled_publish_time =
|
||||||
convert_published_time(data.scheduled_publish_time, &local_user_view, &context).await?;
|
convert_published_time(data.scheduled_publish_time, &local_user_view, &context).await?;
|
||||||
let post_form = PostInsertForm {
|
let post_form = PostInsertForm {
|
||||||
url: url.map(Into::into),
|
url,
|
||||||
body,
|
body,
|
||||||
alt_text: data.alt_text.clone(),
|
alt_text: data.alt_text.clone(),
|
||||||
nsfw: data.nsfw,
|
nsfw: data.nsfw,
|
||||||
|
|
|
@ -152,7 +152,7 @@ impl ActivityHandler for BlockUser {
|
||||||
#[tracing::instrument(skip_all)]
|
#[tracing::instrument(skip_all)]
|
||||||
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
||||||
insert_received_activity(&self.id, context).await?;
|
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 mod_person = self.actor.dereference(context).await?;
|
||||||
let blocked_person = self.object.dereference(context).await?;
|
let blocked_person = self.object.dereference(context).await?;
|
||||||
let target = self.target.dereference(context).await?;
|
let target = self.target.dereference(context).await?;
|
||||||
|
|
|
@ -100,7 +100,7 @@ impl ActivityHandler for UndoBlockUser {
|
||||||
#[tracing::instrument(skip_all)]
|
#[tracing::instrument(skip_all)]
|
||||||
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
||||||
insert_received_activity(&self.id, context).await?;
|
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 mod_person = self.actor.dereference(context).await?;
|
||||||
let blocked_person = self.object.object.dereference(context).await?;
|
let blocked_person = self.object.object.dereference(context).await?;
|
||||||
match self.object.target.dereference(context).await? {
|
match self.object.target.dereference(context).await? {
|
||||||
|
|
|
@ -98,8 +98,8 @@ impl ActivityHandler for UpdateCommunity {
|
||||||
&None,
|
&None,
|
||||||
&self.object.source,
|
&self.object.source,
|
||||||
)),
|
)),
|
||||||
published: self.object.published.map(Into::into),
|
published: self.object.published,
|
||||||
updated: Some(self.object.updated.map(Into::into)),
|
updated: Some(self.object.updated),
|
||||||
nsfw: Some(self.object.sensitive.unwrap_or(false)),
|
nsfw: Some(self.object.sensitive.unwrap_or(false)),
|
||||||
actor_id: Some(self.object.id.into()),
|
actor_id: Some(self.object.id.into()),
|
||||||
public_key: Some(self.object.public_key.public_key_pem),
|
public_key: Some(self.object.public_key.public_key_pem),
|
||||||
|
|
|
@ -194,8 +194,8 @@ impl Object for ApubComment {
|
||||||
post_id: post.id,
|
post_id: post.id,
|
||||||
content,
|
content,
|
||||||
removed: None,
|
removed: None,
|
||||||
published: note.published.map(Into::into),
|
published: note.published,
|
||||||
updated: note.updated.map(Into::into),
|
updated: note.updated,
|
||||||
deleted: Some(false),
|
deleted: Some(false),
|
||||||
ap_id: Some(note.id.into()),
|
ap_id: Some(note.id.into()),
|
||||||
distinguished: note.distinguished,
|
distinguished: note.distinguished,
|
||||||
|
|
|
@ -167,8 +167,8 @@ impl Object for ApubPerson {
|
||||||
deleted: Some(false),
|
deleted: Some(false),
|
||||||
avatar,
|
avatar,
|
||||||
banner,
|
banner,
|
||||||
published: person.published.map(Into::into),
|
published: person.published,
|
||||||
updated: person.updated.map(Into::into),
|
updated: person.updated,
|
||||||
actor_id: Some(person.id.into()),
|
actor_id: Some(person.id.into()),
|
||||||
bio,
|
bio,
|
||||||
local: Some(false),
|
local: Some(false),
|
||||||
|
|
|
@ -249,8 +249,8 @@ impl Object for ApubPost {
|
||||||
url: url.map(Into::into),
|
url: url.map(Into::into),
|
||||||
body,
|
body,
|
||||||
alt_text,
|
alt_text,
|
||||||
published: page.published.map(Into::into),
|
published: page.published,
|
||||||
updated: page.updated.map(Into::into),
|
updated: page.updated,
|
||||||
deleted: Some(false),
|
deleted: Some(false),
|
||||||
nsfw: page.sensitive,
|
nsfw: page.sensitive,
|
||||||
ap_id: Some(page.id.clone().into()),
|
ap_id: Some(page.id.clone().into()),
|
||||||
|
|
|
@ -166,8 +166,8 @@ impl Object for ApubPrivateMessage {
|
||||||
creator_id: creator.id,
|
creator_id: creator.id,
|
||||||
recipient_id: recipient.id,
|
recipient_id: recipient.id,
|
||||||
content,
|
content,
|
||||||
published: note.published.map(Into::into),
|
published: note.published,
|
||||||
updated: note.updated.map(Into::into),
|
updated: note.updated,
|
||||||
deleted: Some(false),
|
deleted: Some(false),
|
||||||
read: None,
|
read: None,
|
||||||
ap_id: Some(note.id.into()),
|
ap_id: Some(note.id.into()),
|
||||||
|
|
Loading…
Reference in a new issue