@@ -251,7 +251,6 @@ pub async fn status_code_and_message(client: &mut TestClient, assertions: &mut V
|
||||
response_status: Some(EchoStatus {
|
||||
code: 2,
|
||||
message: TEST_STATUS_MESSAGE.to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
..Default::default()
|
||||
};
|
||||
@@ -260,7 +259,6 @@ pub async fn status_code_and_message(client: &mut TestClient, assertions: &mut V
|
||||
response_status: Some(EchoStatus {
|
||||
code: 2,
|
||||
message: TEST_STATUS_MESSAGE.to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
..Default::default()
|
||||
};
|
||||
@@ -286,7 +284,6 @@ pub async fn special_status_message(client: &mut TestClient, assertions: &mut Ve
|
||||
response_status: Some(EchoStatus {
|
||||
code: 2,
|
||||
message: SPECIAL_TEST_STATUS_MESSAGE.to_string(),
|
||||
..Default::default()
|
||||
}),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ fn response_length(response: &pb::StreamingOutputCallResponse) -> i32 {
|
||||
}
|
||||
}
|
||||
|
||||
fn response_lengths(responses: &Vec<pb::StreamingOutputCallResponse>) -> Vec<i32> {
|
||||
fn response_lengths(responses: &[pb::StreamingOutputCallResponse]) -> Vec<i32> {
|
||||
responses.iter().map(&response_length).collect()
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ type Streaming<T> = Request<tonic::Streaming<T>>;
|
||||
type Stream<T> = Pin<
|
||||
Box<dyn futures_core::Stream<Item = std::result::Result<T, Status>> + Send + Sync + 'static>,
|
||||
>;
|
||||
type BoxFuture<T, E> = Pin<Box<dyn Future<Output = std::result::Result<T, E>> + Send + 'static>>;
|
||||
|
||||
#[tonic::async_trait]
|
||||
impl pb::test_service_server::TestService for TestService {
|
||||
@@ -187,9 +188,7 @@ where
|
||||
{
|
||||
type Response = S::Response;
|
||||
type Error = S::Error;
|
||||
type Future = Pin<
|
||||
Box<dyn Future<Output = std::result::Result<Self::Response, Self::Error>> + Send + 'static>,
|
||||
>;
|
||||
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||
|
||||
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<std::result::Result<(), Self::Error>> {
|
||||
Ok(()).into()
|
||||
|
||||
Reference in New Issue
Block a user