X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Faggregates%2Fperson_aggregates.rs;h=43feadd456524ce8e904290de0e4c4d754f2b915;hb=92568956353f21649ed9aff68b42699c9d036f30;hp=295f1bfbb94f78947aea0883c86ef711b70d7156;hpb=bbca6ef6dcad4e569fc868947e48e004f60ef43d;p=lemmy.git diff --git a/crates/db_schema/src/aggregates/person_aggregates.rs b/crates/db_schema/src/aggregates/person_aggregates.rs index 295f1bfb..43feadd4 100644 --- a/crates/db_schema/src/aggregates/person_aggregates.rs +++ b/crates/db_schema/src/aggregates/person_aggregates.rs @@ -8,7 +8,7 @@ use diesel::{result::Error, ExpressionMethods, QueryDsl}; use diesel_async::RunQueryDsl; impl PersonAggregates { - pub async fn read(pool: &DbPool, person_id: PersonId) -> Result { + pub async fn read(pool: &mut DbPool<'_>, person_id: PersonId) -> Result { let conn = &mut get_conn(pool).await?; person_aggregates::table .filter(person_aggregates::person_id.eq(person_id)) @@ -19,6 +19,9 @@ impl PersonAggregates { #[cfg(test)] mod tests { + #![allow(clippy::unwrap_used)] + #![allow(clippy::indexing_slicing)] + use crate::{ aggregates::person_aggregates::PersonAggregates, source::{ @@ -37,6 +40,7 @@ mod tests { #[serial] async fn test_crud() { let pool = &build_db_pool_for_tests().await; + let pool = &mut pool.into(); let inserted_instance = Instance::read_or_create(pool, "my_domain.tld".to_string()) .await