still aaaaaaaaaaaaa

This commit is contained in:
dull b 2023-07-05 06:46:31 +00:00
parent 94e83ed4e4
commit a5a1478943
2 changed files with 5 additions and 5 deletions

View file

@ -75,7 +75,7 @@ impl LocalUserLanguage {
let mut lang_ids = convert_update_languages(conn, language_ids).await?; let mut lang_ids = convert_update_languages(conn, language_ids).await?;
// No need to update if languages are unchanged // 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 { if current == lang_ids {
return Ok(()); return Ok(());
} }
@ -162,7 +162,7 @@ impl SiteLanguage {
let lang_ids = convert_update_languages(conn, language_ids).await?; let lang_ids = convert_update_languages(conn, language_ids).await?;
// No need to update if languages are unchanged // 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 { if current == lang_ids {
return Ok(()); return Ok(());
} }
@ -286,7 +286,7 @@ impl CommunityLanguage {
) -> Result<(), Error> { ) -> Result<(), Error> {
let conn = &mut *pool.get_conn().await?; let conn = &mut *pool.get_conn().await?;
if language_ids.is_empty() { 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?; let lang_ids = convert_update_languages(conn, language_ids).await?;

View file

@ -65,7 +65,7 @@ pub trait GetConn: Send {
#[async_trait] #[async_trait]
impl<'a> GetConn for &'a DbPool { impl<'a> GetConn for &'a DbPool {
type Conn<'conn> = PooledConnection<AsyncPgConnection>; type Conn<'conn> = PooledConnection<AsyncPgConnection> where Self: 'conn;
async fn get_conn<'conn>(&mut self) -> Result<Self::Conn<'conn>, DieselError> async fn get_conn<'conn>(&mut self) -> Result<Self::Conn<'conn>, DieselError>
where where
@ -78,7 +78,7 @@ impl<'a> GetConn for &'a DbPool {
#[async_trait] #[async_trait]
impl GetConn for AsyncPgConnection { 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<Self::Conn<'conn>, DieselError> async fn get_conn<'conn>(&mut self) -> Result<Self::Conn<'conn>, DieselError>
where where