mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-09-30 06:22:01 +00:00
Make impl Acquire for &'_ Pool<DB> more general
This commit is contained in:
parent
77238108cf
commit
1b217cfac4
@ -15,7 +15,7 @@ pub trait Acquire<'c> {
|
||||
fn begin(self) -> BoxFuture<'c, Result<Transaction<'c, Self::Database>, Error>>;
|
||||
}
|
||||
|
||||
impl<DB: Database> Acquire<'static> for &'_ Pool<DB> {
|
||||
impl<'a, DB: Database> Acquire<'a> for &'_ Pool<DB> {
|
||||
type Database = DB;
|
||||
|
||||
type Connection = PoolConnection<DB>;
|
||||
@ -24,7 +24,7 @@ impl<DB: Database> Acquire<'static> for &'_ Pool<DB> {
|
||||
Box::pin(self.acquire())
|
||||
}
|
||||
|
||||
fn begin(self) -> BoxFuture<'static, Result<Transaction<'static, DB>, Error>> {
|
||||
fn begin(self) -> BoxFuture<'static, Result<Transaction<'a, DB>, Error>> {
|
||||
let conn = self.acquire();
|
||||
|
||||
Box::pin(async move {
|
||||
|
Loading…
x
Reference in New Issue
Block a user