From c791b880a4344c8fe9ec44f8decab5420ff646a6 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 7 Mar 2024 13:08:37 +0100 Subject: [PATCH] clippy --- Cargo.lock | 3 +-- Cargo.toml | 2 +- crates/db_views/src/site_view.rs | 30 ++++++++++++++---------------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7990d250..fb89b1e1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,8 +17,7 @@ checksum = "8f27d075294830fcab6f66e320dab524bc6d048f4a151698e153205559113772" [[package]] name = "activitypub_federation" version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee115a53849bbcac6c953495b5f9322b56680c0a1bdef6813183f0453f9ee3c" +source = "git+https://github.com/LemmyNet/activitypub-federation-rust.git?branch=debug-signed-fetch#294c77c01b6cc5fd1b34126710edc56cd9769789" dependencies = [ "activitystreams-kinds", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index 037d03919..f722fb3d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,7 +96,7 @@ lemmy_routes = { version = "=0.19.3", path = "./crates/routes" } lemmy_db_views = { version = "=0.19.3", path = "./crates/db_views" } lemmy_db_views_actor = { version = "=0.19.3", path = "./crates/db_views_actor" } lemmy_db_views_moderator = { version = "=0.19.3", path = "./crates/db_views_moderator" } -activitypub_federation = { version = "0.5.1", default-features = false, features = [ +activitypub_federation = { git = "https://github.com/LemmyNet/activitypub-federation-rust.git", branch = "debug-signed-fetch", default-features = false, features = [ "actix-web", ] } diesel = "2.1.4" diff --git a/crates/db_views/src/site_view.rs b/crates/db_views/src/site_view.rs index d60fe3369..52074c982 100644 --- a/crates/db_views/src/site_view.rs +++ b/crates/db_views/src/site_view.rs @@ -9,21 +9,19 @@ use lemmy_db_schema::{ impl SiteView { pub async fn read_local(pool: &mut DbPool<'_>) -> Result { let conn = &mut get_conn(pool).await?; - Ok( - site::table - .inner_join(local_site::table) - .inner_join( - local_site_rate_limit::table.on(local_site::id.eq(local_site_rate_limit::local_site_id)), - ) - .inner_join(site_aggregates::table) - .select(( - site::all_columns, - local_site::all_columns, - local_site_rate_limit::all_columns, - site_aggregates::all_columns, - )) - .first::(conn) - .await?, - ) + site::table + .inner_join(local_site::table) + .inner_join( + local_site_rate_limit::table.on(local_site::id.eq(local_site_rate_limit::local_site_id)), + ) + .inner_join(site_aggregates::table) + .select(( + site::all_columns, + local_site::all_columns, + local_site_rate_limit::all_columns, + site_aggregates::all_columns, + )) + .first::(conn) + .await } }