diff --git a/postgres/src/generic_client.rs b/postgres/src/generic_client.rs index 96f4855..a8396b4 100644 --- a/postgres/src/generic_client.rs +++ b/postgres/src/generic_client.rs @@ -81,7 +81,7 @@ pub trait GenericClient: Sync + private::Sealed { async fn prepare_typed_cached(&self, query: &str, types: &[Type]) -> Result; /// Like `Client::transaction`. - async fn transaction(&mut self) -> Result, Error>; + async fn transaction<'a>(&'a mut self) -> Result, Error>; /// Like `Client::batch_execute`. async fn batch_execute(&self, query: &str) -> Result<(), Error>; @@ -167,7 +167,7 @@ impl GenericClient for Client { ClientWrapper::prepare_typed_cached(self, query, types).await } - async fn transaction(&mut self) -> Result, Error> { + async fn transaction<'a>(&'a mut self) -> Result, Error> { ClientWrapper::transaction(self).await }