Skip to content

Commit

Permalink
Fix CI warnings
Browse files Browse the repository at this point in the history
Fallout from the new `elided_named_lifetimes` lint.
  • Loading branch information
Kobzol committed Oct 23, 2024
1 parent 67739c3 commit 458ae84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion database/src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub mod sqlite;
#[async_trait::async_trait]
pub trait Connection: Send + Sync {
async fn maybe_create_indices(&mut self);
async fn transaction(&mut self) -> Box<dyn Transaction + '_>;
async fn transaction<'a>(&'a mut self) -> Box<dyn Transaction + 'a>;

async fn load_index(&mut self) -> Index;

Expand Down
2 changes: 1 addition & 1 deletion database/src/pool/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ where
P: Send + Sync + PClient,
{
async fn maybe_create_indices(&mut self) {}
async fn transaction(&mut self) -> Box<dyn Transaction + '_> {
async fn transaction<'a>(&'a mut self) -> Box<dyn Transaction + 'a> {
let statements = self.statements().clone();
let tx = self.conn_mut().transaction().await.unwrap();
Box::new(PostgresTransaction {
Expand Down
2 changes: 1 addition & 1 deletion database/src/pool/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ impl Connection for SqliteConnection {
.unwrap();
}

async fn transaction(&mut self) -> Box<dyn Transaction + '_> {
async fn transaction<'a>(&'a mut self) -> Box<dyn Transaction + 'a> {
self.raw().execute_batch("BEGIN DEFERRED").unwrap();
Box::new(SqliteTransaction {
conn: self,
Expand Down

0 comments on commit 458ae84

Please sign in to comment.