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

View File

@ -54,10 +54,7 @@ impl Updater {
self self
} }
pub fn exec<'a, C>( pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<UpdateResult, DbErr>> + '_
self,
db: &'a C
) -> impl Future<Output = Result<UpdateResult, DbErr>> + '_
where where
C: ConnectionTrait<'a>, 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!(&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, DatabaseConnection,
|x: &DebugQuery<_, DatabaseConnection>| x.value.get_database_backend() >| x.value.get_database_backend());
); debug_query_build!(&DatabaseConnection, |x: &DebugQuery<
debug_query_build!( _,
&DatabaseConnection, &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`. /// Helper to get a `Statement` from an object that impl `QueryTrait`.
/// ///