File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11use diesel:: prelude:: { ExpressionMethods , OptionalExtension , QueryDsl } ;
22use diesel:: QueryResult ;
33use diesel_async:: * ;
4- use futures :: FutureExt ;
4+ use scoped_futures :: ScopedFutureExt ;
55use std:: fmt:: Debug ;
6- use std:: pin:: Pin ;
76
87#[ cfg( feature = "postgres" ) ]
98mod custom_types;
@@ -12,7 +11,7 @@ mod type_check;
1211async fn transaction_test ( conn : & mut TestConnection ) -> QueryResult < ( ) > {
1312 let res = conn
1413 . transaction :: < i32 , diesel:: result:: Error , _ > ( |conn| {
15- Box :: pin ( async move {
14+ async move {
1615 let users: Vec < User > = users:: table. load ( conn) . await ?;
1716 assert_eq ! ( & users[ 0 ] . name, "John Doe" ) ;
1817 assert_eq ! ( & users[ 1 ] . name, "Jane Doe" ) ;
@@ -31,7 +30,7 @@ async fn transaction_test(conn: &mut TestConnection) -> QueryResult<()> {
3130 assert_eq ! ( count, 3 ) ;
3231 Ok ( ( ) )
3332 }
34- . boxed ( )
33+ . scope_boxed ( )
3534 } )
3635 . await ;
3736 assert ! ( res. is_ok( ) ) ;
@@ -48,7 +47,8 @@ async fn transaction_test(conn: &mut TestConnection) -> QueryResult<()> {
4847 assert_eq ! ( count, 4 ) ;
4948
5049 Err ( diesel:: result:: Error :: RollbackTransaction )
51- } ) as Pin < Box < _ > >
50+ }
51+ . scope_boxed ( )
5252 } )
5353 . await ;
5454 assert_eq ! (
You can’t perform that action at this time.
0 commit comments