From 626c25614dbd6d3d4058a6df5b745b215b2d2e86 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Fri, 10 Jan 2025 21:59:25 +0800 Subject: [PATCH] clippy --- src/executor/select.rs | 18 +++++++++--------- src/executor/update.rs | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/executor/select.rs b/src/executor/select.rs index 99177626..78ba59eb 100644 --- a/src/executor/select.rs +++ b/src/executor/select.rs @@ -412,7 +412,7 @@ where } /// Get one Model from the SELECT query - pub async fn one<'a, C>(self, db: &C) -> Result, DbErr> + pub async fn one(self, db: &C) -> Result, DbErr> where C: ConnectionTrait, { @@ -420,7 +420,7 @@ where } /// Get all Models from the SELECT query - pub async fn all<'a, C>(self, db: &C) -> Result, DbErr> + pub async fn all(self, db: &C) -> Result, DbErr> where C: ConnectionTrait, { @@ -490,7 +490,7 @@ where } /// Get one Model from the Select query - pub async fn one<'a, C>(self, db: &C) -> Result)>, DbErr> + pub async fn one(self, db: &C) -> Result)>, DbErr> where C: ConnectionTrait, { @@ -498,7 +498,7 @@ where } /// Get all Models from the Select query - pub async fn all<'a, C>(self, db: &C) -> Result)>, DbErr> + pub async fn all(self, db: &C) -> Result)>, DbErr> where C: ConnectionTrait, { @@ -600,7 +600,7 @@ where /// > then use [`ModelTrait::find_related`] on the model. /// > /// > See https://www.sea-ql.org/SeaORM/docs/basic-crud/select#lazy-loading for details. - pub async fn all<'a, C>(self, db: &C) -> Result)>, DbErr> + pub async fn all(self, db: &C) -> Result)>, DbErr> where C: ConnectionTrait, { @@ -667,7 +667,7 @@ where } /// Get an item from the Select query - pub async fn one<'a, C>(mut self, db: &C) -> Result, DbErr> + pub async fn one(mut self, db: &C) -> Result, DbErr> where C: ConnectionTrait, { @@ -676,7 +676,7 @@ where } /// Get all items from the Select query - pub async fn all<'a, C>(self, db: &C) -> Result, DbErr> + pub async fn all(self, db: &C) -> Result, DbErr> where C: ConnectionTrait, { @@ -911,7 +911,7 @@ where /// # Ok(()) /// # } /// ``` - pub async fn one<'a, C>(self, db: &C) -> Result, DbErr> + pub async fn one(self, db: &C) -> Result, DbErr> where C: ConnectionTrait, { @@ -962,7 +962,7 @@ where /// # Ok(()) /// # } /// ``` - pub async fn all<'a, C>(self, db: &C) -> Result, DbErr> + pub async fn all(self, db: &C) -> Result, DbErr> where C: ConnectionTrait, { diff --git a/src/executor/update.rs b/src/executor/update.rs index 4a8045f5..52864307 100644 --- a/src/executor/update.rs +++ b/src/executor/update.rs @@ -18,12 +18,12 @@ pub struct UpdateResult { pub rows_affected: u64, } -impl<'a, A: 'a> UpdateOne +impl UpdateOne where A: ActiveModelTrait, { /// Execute an update operation on an ActiveModel - pub async fn exec<'b, C>(self, db: &'b C) -> Result<::Model, DbErr> + pub async fn exec(self, db: &C) -> Result<::Model, DbErr> where ::Model: IntoActiveModel, C: ConnectionTrait,