diff --git a/sea-orm-macros/src/derives/case_style.rs b/sea-orm-macros/src/derives/case_style.rs index cf087a47..8b800ce7 100644 --- a/sea-orm-macros/src/derives/case_style.rs +++ b/sea-orm-macros/src/derives/case_style.rs @@ -111,7 +111,7 @@ impl CaseStyleHelpers for Ident { } } -impl<'meta> TryFrom<&ParseNestedMeta<'meta>> for CaseStyle { +impl TryFrom<&ParseNestedMeta<'_>> for CaseStyle { type Error = syn::Error; fn try_from(value: &ParseNestedMeta) -> Result { diff --git a/src/database/stream/metric.rs b/src/database/stream/metric.rs index be091c38..9b56a36b 100644 --- a/src/database/stream/metric.rs +++ b/src/database/stream/metric.rs @@ -31,7 +31,7 @@ impl<'a> MetricStream<'a> { } } -impl<'a> Stream for MetricStream<'a> { +impl Stream for MetricStream<'_> { type Item = Result; fn poll_next( @@ -51,7 +51,7 @@ impl<'a> Stream for MetricStream<'a> { } } -impl<'a> Drop for MetricStream<'a> { +impl Drop for MetricStream<'_> { fn drop(&mut self) { if let (Some(callback), Some(elapsed)) = (self.metric_callback.as_deref(), self.elapsed) { let info = crate::metric::Info { diff --git a/src/database/stream/transaction.rs b/src/database/stream/transaction.rs index 0040455a..06034a10 100644 --- a/src/database/stream/transaction.rs +++ b/src/database/stream/transaction.rs @@ -27,20 +27,20 @@ pub struct TransactionStream<'a> { stream: MetricStream<'this>, } -impl<'a> std::fmt::Debug for TransactionStream<'a> { +impl std::fmt::Debug for TransactionStream<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "TransactionStream") } } -impl<'a> TransactionStream<'a> { +impl TransactionStream<'_> { #[instrument(level = "trace", skip(metric_callback))] #[allow(unused_variables)] pub(crate) fn build( - conn: MutexGuard<'a, InnerConnection>, + conn: MutexGuard<'_, InnerConnection>, stmt: Statement, metric_callback: Option, - ) -> TransactionStream<'a> { + ) -> TransactionStream<'_> { TransactionStreamBuilder { stmt, conn, @@ -98,7 +98,7 @@ impl<'a> TransactionStream<'a> { } } -impl<'a> Stream for TransactionStream<'a> { +impl Stream for TransactionStream<'_> { type Item = Result; fn poll_next( diff --git a/src/executor/delete.rs b/src/executor/delete.rs index e1663a6c..ae2a27aa 100644 --- a/src/executor/delete.rs +++ b/src/executor/delete.rs @@ -20,7 +20,7 @@ where A: ActiveModelTrait, { /// Execute a DELETE operation on one ActiveModel - pub fn exec(self, db: &'a C) -> impl Future> + '_ + pub fn exec(self, db: &'a C) -> impl Future> + 'a where C: ConnectionTrait, { @@ -34,7 +34,7 @@ where E: EntityTrait, { /// Execute a DELETE operation on many ActiveModels - pub fn exec(self, db: &'a C) -> impl Future> + '_ + pub fn exec(self, db: &'a C) -> impl Future> + 'a where C: ConnectionTrait, { diff --git a/src/executor/insert.rs b/src/executor/insert.rs index 665fa5be..1e6aca62 100644 --- a/src/executor/insert.rs +++ b/src/executor/insert.rs @@ -110,7 +110,7 @@ where { /// Execute an insert operation #[allow(unused_mut)] - pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + '_ + pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + 'a where C: ConnectionTrait, A: 'a, @@ -134,7 +134,7 @@ where pub fn exec_without_returning<'a, C>( self, db: &'a C, - ) -> impl Future> + '_ + ) -> impl Future> + 'a where ::Model: IntoActiveModel, C: ConnectionTrait, @@ -147,7 +147,7 @@ where pub fn exec_with_returning<'a, C>( self, db: &'a C, - ) -> impl Future::Model, DbErr>> + '_ + ) -> impl Future::Model, DbErr>> + 'a where ::Model: IntoActiveModel, C: ConnectionTrait, @@ -171,7 +171,7 @@ where } /// Execute an insert operation, returning the last inserted id - pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + '_ + pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + 'a where C: ConnectionTrait, A: 'a, @@ -183,7 +183,7 @@ where pub fn exec_without_returning<'a, C>( self, db: &'a C, - ) -> impl Future> + '_ + ) -> impl Future> + 'a where C: ConnectionTrait, A: 'a, @@ -195,7 +195,7 @@ where pub fn exec_with_returning<'a, C>( self, db: &'a C, - ) -> impl Future::Model, DbErr>> + '_ + ) -> impl Future::Model, DbErr>> + 'a where ::Model: IntoActiveModel, C: ConnectionTrait,