Skip to content

Commit a197c20

Browse files
authored
fix(transport): connect w/ connector infailable (#922)
1 parent ee6e726 commit a197c20

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tests/integration_tests/tests/status.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ async fn status_from_server_stream_with_source() {
185185
.unwrap()
186186
.connect_with_connector_lazy(tower::service_fn(move |_: Uri| async move {
187187
Err::<MockStream, _>(std::io::Error::new(std::io::ErrorKind::Other, "WTF"))
188-
}))
189-
.unwrap();
188+
}));
190189

191190
let mut client = test_stream_client::TestStreamClient::new(channel);
192191

tonic/src/transport/channel/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl Endpoint {
346346
///
347347
/// See the `uds` example for an example on how to use this function to build channel that
348348
/// uses a Unix socket transport.
349-
pub fn connect_with_connector_lazy<C>(&self, connector: C) -> Result<Channel, Error>
349+
pub fn connect_with_connector_lazy<C>(&self, connector: C) -> Channel
350350
where
351351
C: MakeConnection<Uri> + Send + 'static,
352352
C::Connection: Unpin + Send + 'static,
@@ -359,7 +359,7 @@ impl Endpoint {
359359
#[cfg(not(feature = "tls"))]
360360
let connector = service::connector(connector);
361361

362-
Ok(Channel::new(connector, self.clone()))
362+
Channel::new(connector, self.clone())
363363
}
364364

365365
/// Get the endpoint uri.

0 commit comments

Comments
 (0)