mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-07 07:35:25 +00:00
clippy
This commit is contained in:
parent
d043d6ddaa
commit
c791b880a4
3 changed files with 16 additions and 19 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -9,21 +9,19 @@ use lemmy_db_schema::{
|
|||
impl SiteView {
|
||||
pub async fn read_local(pool: &mut DbPool<'_>) -> Result<Self, Error> {
|
||||
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::<SiteView>(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::<SiteView>(conn)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue