cargo fmt

This commit is contained in:
Chris Tsang 2021-10-12 14:52:11 +08:00
parent f58d890df5
commit 3a6e55ced1
3 changed files with 9 additions and 18 deletions

View File

@ -28,10 +28,7 @@ where
A: ActiveModelTrait,
{
#[allow(unused_mut)]
pub fn exec<'a, C>(
self,
db: &'a C,
) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
where
C: ConnectionTrait<'a>,
A: 'a,
@ -64,10 +61,7 @@ where
}
}
pub fn exec<'a, C>(
self,
db: &'a C,
) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
where
C: ConnectionTrait<'a>,
A: 'a,

View File

@ -54,10 +54,7 @@ impl Updater {
self
}
pub fn exec<'a, C>(
self,
db: &'a C
) -> impl Future<Output = Result<UpdateResult, DbErr>> + '_
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<UpdateResult, DbErr>> + '_
where
C: ConnectionTrait<'a>,
{

View File

@ -23,14 +23,14 @@ macro_rules! debug_query_build {
debug_query_build!(DbBackend, |x: &DebugQuery<_, DbBackend>| x.value);
debug_query_build!(&DbBackend, |x: &DebugQuery<_, &DbBackend>| *x.value);
debug_query_build!(
debug_query_build!(DatabaseConnection, |x: &DebugQuery<
_,
DatabaseConnection,
|x: &DebugQuery<_, DatabaseConnection>| x.value.get_database_backend()
);
debug_query_build!(
>| x.value.get_database_backend());
debug_query_build!(&DatabaseConnection, |x: &DebugQuery<
_,
&DatabaseConnection,
|x: &DebugQuery<_, &DatabaseConnection>| x.value.get_database_backend()
);
>| x.value.get_database_backend());
/// Helper to get a `Statement` from an object that impl `QueryTrait`.
///