From a5a147894336cc08f056eee38ef2078d8ada68a9 Mon Sep 17 00:00:00 2001 From: dull b Date: Wed, 5 Jul 2023 06:46:31 +0000 Subject: [PATCH] still aaaaaaaaaaaaa --- crates/db_schema/src/impls/actor_language.rs | 6 +++--- crates/db_schema/src/utils.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/db_schema/src/impls/actor_language.rs b/crates/db_schema/src/impls/actor_language.rs index a3e0d7419..ac50d2b84 100644 --- a/crates/db_schema/src/impls/actor_language.rs +++ b/crates/db_schema/src/impls/actor_language.rs @@ -75,7 +75,7 @@ impl LocalUserLanguage { let mut lang_ids = convert_update_languages(conn, language_ids).await?; // No need to update if languages are unchanged - let current = LocalUserLanguage::read(pool, for_local_user_id).await?; + let current = LocalUserLanguage::read(conn, for_local_user_id).await?; if current == lang_ids { return Ok(()); } @@ -162,7 +162,7 @@ impl SiteLanguage { let lang_ids = convert_update_languages(conn, language_ids).await?; // No need to update if languages are unchanged - let current = SiteLanguage::read(pool, site.id).await?; + let current = SiteLanguage::read(conn, site.id).await?; if current == lang_ids { return Ok(()); } @@ -286,7 +286,7 @@ impl CommunityLanguage { ) -> Result<(), Error> { let conn = &mut *pool.get_conn().await?; if language_ids.is_empty() { - language_ids = SiteLanguage::read_local_raw(pool).await?; + language_ids = SiteLanguage::read_local_raw(conn).await?; } let lang_ids = convert_update_languages(conn, language_ids).await?; diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index 3db39d738..32e6f6c6a 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -65,7 +65,7 @@ pub trait GetConn: Send { #[async_trait] impl<'a> GetConn for &'a DbPool { - type Conn<'conn> = PooledConnection; + type Conn<'conn> = PooledConnection where Self: 'conn; async fn get_conn<'conn>(&mut self) -> Result, DieselError> where @@ -78,7 +78,7 @@ impl<'a> GetConn for &'a DbPool { #[async_trait] impl GetConn for AsyncPgConnection { - type Conn<'conn> = &'conn mut AsyncPgConnection; + type Conn<'conn> = &'conn mut AsyncPgConnection where Self: 'conn; async fn get_conn<'conn>(&mut self) -> Result, DieselError> where