diff --git a/tests/integration_tests/tests/status.rs b/tests/integration_tests/tests/status.rs index af32ba49b..0c3920d9c 100644 --- a/tests/integration_tests/tests/status.rs +++ b/tests/integration_tests/tests/status.rs @@ -185,8 +185,7 @@ async fn status_from_server_stream_with_source() { .unwrap() .connect_with_connector_lazy(tower::service_fn(move |_: Uri| async move { Err::(std::io::Error::new(std::io::ErrorKind::Other, "WTF")) - })) - .unwrap(); + })); let mut client = test_stream_client::TestStreamClient::new(channel); diff --git a/tonic/src/transport/channel/endpoint.rs b/tonic/src/transport/channel/endpoint.rs index af2d16f36..1ea4b3b6d 100644 --- a/tonic/src/transport/channel/endpoint.rs +++ b/tonic/src/transport/channel/endpoint.rs @@ -346,7 +346,7 @@ impl Endpoint { /// /// See the `uds` example for an example on how to use this function to build channel that /// uses a Unix socket transport. - pub fn connect_with_connector_lazy(&self, connector: C) -> Result + pub fn connect_with_connector_lazy(&self, connector: C) -> Channel where C: MakeConnection + Send + 'static, C::Connection: Unpin + Send + 'static, @@ -359,7 +359,7 @@ impl Endpoint { #[cfg(not(feature = "tls"))] let connector = service::connector(connector); - Ok(Channel::new(connector, self.clone())) + Channel::new(connector, self.clone()) } /// Get the endpoint uri.