mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 19:31:33 +00:00
still aaaaaaaaaaaaa
This commit is contained in:
parent
94e83ed4e4
commit
a5a1478943
2 changed files with 5 additions and 5 deletions
|
@ -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?;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ pub trait GetConn: Send {
|
|||
|
||||
#[async_trait]
|
||||
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>
|
||||
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<Self::Conn<'conn>, DieselError>
|
||||
where
|
||||
|
|
Loading…
Reference in a new issue