Skip to content

Commit 9d0f7e3

Browse files
committed
clippy
1 parent 2eb398e commit 9d0f7e3

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

sea-orm-macros/src/derives/case_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl CaseStyleHelpers for Ident {
111111
}
112112
}
113113

114-
impl<'meta> TryFrom<&ParseNestedMeta<'meta>> for CaseStyle {
114+
impl TryFrom<&ParseNestedMeta<'_>> for CaseStyle {
115115
type Error = syn::Error;
116116

117117
fn try_from(value: &ParseNestedMeta) -> Result<Self, Self::Error> {

src/database/stream/metric.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'a> MetricStream<'a> {
3131
}
3232
}
3333

34-
impl<'a> Stream for MetricStream<'a> {
34+
impl Stream for MetricStream<'_> {
3535
type Item = Result<QueryResult, DbErr>;
3636

3737
fn poll_next(
@@ -51,7 +51,7 @@ impl<'a> Stream for MetricStream<'a> {
5151
}
5252
}
5353

54-
impl<'a> Drop for MetricStream<'a> {
54+
impl Drop for MetricStream<'_> {
5555
fn drop(&mut self) {
5656
if let (Some(callback), Some(elapsed)) = (self.metric_callback.as_deref(), self.elapsed) {
5757
let info = crate::metric::Info {

src/database/stream/transaction.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ pub struct TransactionStream<'a> {
2727
stream: MetricStream<'this>,
2828
}
2929

30-
impl<'a> std::fmt::Debug for TransactionStream<'a> {
30+
impl std::fmt::Debug for TransactionStream<'_> {
3131
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3232
write!(f, "TransactionStream")
3333
}
3434
}
3535

36-
impl<'a> TransactionStream<'a> {
36+
impl TransactionStream<'_> {
3737
#[instrument(level = "trace", skip(metric_callback))]
3838
#[allow(unused_variables)]
3939
pub(crate) fn build(
40-
conn: MutexGuard<'a, InnerConnection>,
40+
conn: MutexGuard<'_, InnerConnection>,
4141
stmt: Statement,
4242
metric_callback: Option<crate::metric::Callback>,
43-
) -> TransactionStream<'a> {
43+
) -> TransactionStream<'_> {
4444
TransactionStreamBuilder {
4545
stmt,
4646
conn,
@@ -98,7 +98,7 @@ impl<'a> TransactionStream<'a> {
9898
}
9999
}
100100

101-
impl<'a> Stream for TransactionStream<'a> {
101+
impl Stream for TransactionStream<'_> {
102102
type Item = Result<QueryResult, DbErr>;
103103

104104
fn poll_next(

src/executor/delete.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ where
2020
A: ActiveModelTrait,
2121
{
2222
/// Execute a DELETE operation on one ActiveModel
23-
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + '_
23+
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + 'a
2424
where
2525
C: ConnectionTrait,
2626
{
@@ -34,7 +34,7 @@ where
3434
E: EntityTrait,
3535
{
3636
/// Execute a DELETE operation on many ActiveModels
37-
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + '_
37+
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + 'a
3838
where
3939
C: ConnectionTrait,
4040
{

src/executor/insert.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ where
110110
{
111111
/// Execute an insert operation
112112
#[allow(unused_mut)]
113-
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + '_
113+
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
114114
where
115115
C: ConnectionTrait,
116116
A: 'a,
@@ -134,7 +134,7 @@ where
134134
pub fn exec_without_returning<'a, C>(
135135
self,
136136
db: &'a C,
137-
) -> impl Future<Output = Result<u64, DbErr>> + '_
137+
) -> impl Future<Output = Result<u64, DbErr>> + 'a
138138
where
139139
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
140140
C: ConnectionTrait,
@@ -147,7 +147,7 @@ where
147147
pub fn exec_with_returning<'a, C>(
148148
self,
149149
db: &'a C,
150-
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + '_
150+
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + 'a
151151
where
152152
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
153153
C: ConnectionTrait,
@@ -171,7 +171,7 @@ where
171171
}
172172

173173
/// Execute an insert operation, returning the last inserted id
174-
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + '_
174+
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
175175
where
176176
C: ConnectionTrait,
177177
A: 'a,
@@ -183,7 +183,7 @@ where
183183
pub fn exec_without_returning<'a, C>(
184184
self,
185185
db: &'a C,
186-
) -> impl Future<Output = Result<u64, DbErr>> + '_
186+
) -> impl Future<Output = Result<u64, DbErr>> + 'a
187187
where
188188
C: ConnectionTrait,
189189
A: 'a,
@@ -195,7 +195,7 @@ where
195195
pub fn exec_with_returning<'a, C>(
196196
self,
197197
db: &'a C,
198-
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + '_
198+
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + 'a
199199
where
200200
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
201201
C: ConnectionTrait,

0 commit comments

Comments
 (0)