File tree 1 file changed +8
-16
lines changed
1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -501,28 +501,20 @@ fn test_get_stream_terminal_type() {
501
501
}
502
502
if let Some ( device) = test_get_default_device ( Scope :: Input ) {
503
503
let streams = run_serially ( || get_device_streams ( device, DeviceType :: INPUT ) ) . unwrap ( ) ;
504
- for stream in streams {
505
- assert_eq ! (
506
- terminal_type_to_device_type(
507
- run_serially( || get_stream_terminal_type( stream) ) . unwrap( )
508
- ) ,
509
- Some ( DeviceType :: INPUT )
510
- ) ;
511
- }
504
+ assert ! ( streams. iter( ) . any( |& s| {
505
+ terminal_type_to_device_type( run_serially( || get_stream_terminal_type( s) ) . unwrap( ) )
506
+ == Some ( DeviceType :: INPUT )
507
+ } ) ) ;
512
508
} else {
513
509
println ! ( "No input device." ) ;
514
510
}
515
511
516
512
if let Some ( device) = test_get_default_device ( Scope :: Output ) {
517
513
let streams = run_serially ( || get_device_streams ( device, DeviceType :: OUTPUT ) ) . unwrap ( ) ;
518
- for stream in streams {
519
- assert_eq ! (
520
- terminal_type_to_device_type(
521
- run_serially( || get_stream_terminal_type( stream) ) . unwrap( )
522
- ) ,
523
- Some ( DeviceType :: OUTPUT )
524
- ) ;
525
- }
514
+ assert ! ( streams. iter( ) . any( |& s| {
515
+ terminal_type_to_device_type( run_serially( || get_stream_terminal_type( s) ) . unwrap( ) )
516
+ == Some ( DeviceType :: OUTPUT )
517
+ } ) ) ;
526
518
} else {
527
519
println ! ( "No output device." ) ;
528
520
}
You can’t perform that action at this time.
0 commit comments