Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Jan 10, 2025
1 parent 9fd8b4d commit 626c256
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/executor/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,15 @@ where
}

/// Get one Model from the SELECT query
pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr>
pub async fn one<C>(self, db: &C) -> Result<Option<E::Model>, DbErr>
where
C: ConnectionTrait,
{
self.into_model().one(db).await
}

/// Get all Models from the SELECT query
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr>
pub async fn all<C>(self, db: &C) -> Result<Vec<E::Model>, DbErr>
where
C: ConnectionTrait,
{
Expand Down Expand Up @@ -490,15 +490,15 @@ where
}

/// Get one Model from the Select query
pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr>
pub async fn one<C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr>
where
C: ConnectionTrait,
{
self.into_model().one(db).await
}

/// Get all Models from the Select query
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr>
pub async fn all<C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr>
where
C: ConnectionTrait,
{
Expand Down Expand Up @@ -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<Vec<(E::Model, Vec<F::Model>)>, DbErr>
pub async fn all<C>(self, db: &C) -> Result<Vec<(E::Model, Vec<F::Model>)>, DbErr>
where
C: ConnectionTrait,
{
Expand Down Expand Up @@ -667,7 +667,7 @@ where
}

/// Get an item from the Select query
pub async fn one<'a, C>(mut self, db: &C) -> Result<Option<S::Item>, DbErr>
pub async fn one<C>(mut self, db: &C) -> Result<Option<S::Item>, DbErr>
where
C: ConnectionTrait,
{
Expand All @@ -676,7 +676,7 @@ where
}

/// Get all items from the Select query
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
pub async fn all<C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
where
C: ConnectionTrait,
{
Expand Down Expand Up @@ -911,7 +911,7 @@ where
/// # Ok(())
/// # }
/// ```
pub async fn one<'a, C>(self, db: &C) -> Result<Option<S::Item>, DbErr>
pub async fn one<C>(self, db: &C) -> Result<Option<S::Item>, DbErr>
where
C: ConnectionTrait,
{
Expand Down Expand Up @@ -962,7 +962,7 @@ where
/// # Ok(())
/// # }
/// ```
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
pub async fn all<C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
where
C: ConnectionTrait,
{
Expand Down
4 changes: 2 additions & 2 deletions src/executor/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ pub struct UpdateResult {
pub rows_affected: u64,
}

impl<'a, A: 'a> UpdateOne<A>
impl<A> UpdateOne<A>
where
A: ActiveModelTrait,
{
/// Execute an update operation on an ActiveModel
pub async fn exec<'b, C>(self, db: &'b C) -> Result<<A::Entity as EntityTrait>::Model, DbErr>
pub async fn exec<C>(self, db: &C) -> Result<<A::Entity as EntityTrait>::Model, DbErr>
where
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
C: ConnectionTrait,
Expand Down

0 comments on commit 626c256

Please sign in to comment.