@@ -79,13 +79,10 @@ pub async fn large_unary(client: &mut TestClient, assertions: &mut Vec<TestAsser
7979// }
8080
8181pub async fn client_streaming ( client : & mut TestClient , assertions : & mut Vec < TestAssertion > ) {
82- let requests = REQUEST_LENGTHS
83- . iter ( )
84- . map ( |len| StreamingInputCallRequest {
85- payload : Some ( crate :: client_payload ( * len as usize ) ) ,
86- ..Default :: default ( )
87- } )
88- . map ( |v| Ok ( v) ) ;
82+ let requests = REQUEST_LENGTHS . iter ( ) . map ( |len| StreamingInputCallRequest {
83+ payload : Some ( crate :: client_payload ( * len as usize ) ) ,
84+ ..Default :: default ( )
85+ } ) ;
8986
9087 let stream = stream:: iter ( requests) ;
9188
@@ -154,9 +151,7 @@ pub async fn ping_pong(client: &mut TestClient, assertions: &mut Vec<TestAsserti
154151 let ( mut tx, rx) = mpsc:: unbounded_channel ( ) ;
155152 tx. try_send ( make_ping_pong_request ( 0 ) ) . unwrap ( ) ;
156153
157- let result = client
158- . full_duplex_call ( Request :: new ( rx. map ( |s| Ok ( s) ) ) )
159- . await ;
154+ let result = client. full_duplex_call ( Request :: new ( rx) ) . await ;
160155
161156 assertions. push ( test_assert ! (
162157 "call must be successful" ,
@@ -272,7 +267,7 @@ pub async fn status_code_and_message(client: &mut TestClient, assertions: &mut V
272267 let result = client. unary_call ( Request :: new ( simple_req) ) . await ;
273268 validate_response ( result, assertions) ;
274269
275- let stream = stream:: iter ( vec ! [ Ok ( duplex_req) ] ) ;
270+ let stream = stream:: iter ( vec ! [ duplex_req] ) ;
276271 let result = match client. full_duplex_call ( Request :: new ( stream) ) . await {
277272 Ok ( response) => {
278273 let stream = response. into_inner ( ) ;
@@ -359,7 +354,7 @@ pub async fn custom_metadata(client: &mut TestClient, assertions: &mut Vec<TestA
359354 req_unary. metadata_mut ( ) . insert ( key1, value1. clone ( ) ) ;
360355 req_unary. metadata_mut ( ) . insert_bin ( key2, value2. clone ( ) ) ;
361356
362- let stream = stream:: iter ( vec ! [ Ok ( make_ping_pong_request( 0 ) ) ] ) ;
357+ let stream = stream:: iter ( vec ! [ make_ping_pong_request( 0 ) ] ) ;
363358 let mut req_stream = Request :: new ( stream) ;
364359 req_stream. metadata_mut ( ) . insert ( key1, value1. clone ( ) ) ;
365360 req_stream. metadata_mut ( ) . insert_bin ( key2, value2. clone ( ) ) ;
0 commit comments