@@ -7,8 +7,7 @@ use async_recursion::async_recursion;
77use cxx_async:: CxxAsyncException ;
88use futures:: executor:: { self , ThreadPool } ;
99use futures:: task:: SpawnExt ;
10- use futures:: { join, Stream } ;
11- use futures:: { StreamExt , TryStreamExt } ;
10+ use futures:: { join, Stream , StreamExt } ;
1211use once_cell:: sync:: Lazy ;
1312use std:: future:: Future ;
1413use std:: ops:: Range ;
@@ -271,6 +270,8 @@ fn test_indirect_fizzbuzz() {
271270
272271#[ test]
273272fn test_streams_throwing_exceptions ( ) {
273+ use futures:: TryStreamExt ;
274+
274275 let mut vector = executor:: block_on (
275276 ffi:: cppcoro_not_fizzbuzz ( )
276277 . map_err ( |err| err. what ( ) . to_owned ( ) )
@@ -347,12 +348,12 @@ fn main() {
347348 // Test Rust calling C++ streams that throw exceptions partway through.
348349 let vector = executor:: block_on (
349350 ffi:: cppcoro_not_fizzbuzz ( )
350- . map ( |result| format ! ( "{:?}" , result ) )
351+ . map ( |result| format ! ( "{result :?}" ) )
351352 . collect :: < Vec < String > > ( ) ,
352353 ) ;
353354 println ! ( "{}" , vector. join( ", " ) ) ;
354355
355356 // Test that destructors are called when dropping a future.
356- let _ = ffi:: cppcoro_drop_coroutine_wait ( ) ;
357+ ffi:: cppcoro_drop_coroutine_wait ( ) ;
357358 drop ( executor:: block_on ( ffi:: cppcoro_drop_coroutine_signal ( ) ) ) ;
358359}
0 commit comments