Fix all default clippy warnings (#480)

All trivial, fixes were for:
 - #[deny(clippy::if_same_then_else)]
 - #[warn(clippy::explicit_auto_deref)]
 - #[warn(clippy::bool_assert_comparison)]

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Tom Martin
2022-11-17 17:09:53 +00:00
committed by GitHub
parent da19a07943
commit ba28bc94d3
26 changed files with 77 additions and 87 deletions

View File

@@ -16,7 +16,7 @@ pub async fn mods_list(
let user = get_user_from_headers(req.headers(), &**pool).await.ok();
let id_option = crate::database::models::User::get_id_from_username_or_id(
&*info.into_inner().0,
&info.into_inner().0,
&**pool,
)
.await?;
@@ -59,7 +59,7 @@ pub async fn user_follows(
) -> Result<HttpResponse, ApiError> {
let user = get_user_from_headers(req.headers(), &**pool).await?;
let id_option = crate::database::models::User::get_id_from_username_or_id(
&*info.into_inner().0,
&info.into_inner().0,
&**pool,
)
.await?;