Skip to content

Commit

Permalink
move MakeConnection re-export to codegen to clean up imports in gener…
Browse files Browse the repository at this point in the history
…ated code
  • Loading branch information
akshayknarayan committed Nov 22, 2019
1 parent 6f478b0 commit 2969071
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tonic-build/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn generate_connect(service_ident: &syn::Ident) -> TokenStream {
/// connector.
pub async fn connect_with_connector<C, D>(dst: D, connector: C) -> Result<Self, tonic::transport::Error>
where
C: tonic::transport::MakeConnection<http::Uri> + Send + 'static,
C: MakeConnection<http::Uri> + Send + 'static,
C::Connection: Unpin + Send + 'static,
C::Future: Send + 'static,
C::Error: Into<Box<dyn std::error::Error + Send + Sync>> + Send,
Expand Down
2 changes: 2 additions & 0 deletions tonic/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ pub use std::future::Future;
pub use std::pin::Pin;
pub use std::sync::Arc;
pub use std::task::{Context, Poll};
#[cfg(feature = "transport")]
pub use tower_make::MakeConnection;
pub use tower_service::Service;
pub type StdError = Box<dyn std::error::Error + Send + Sync + 'static>;
pub use crate::body::Body;
Expand Down
1 change: 0 additions & 1 deletion tonic/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ pub use self::error::Error;
pub use self::server::{Server, ServiceName};
pub use self::tls::{Certificate, Identity};
pub use hyper::Body;
pub use tower_make::MakeConnection;

#[cfg(feature = "tls")]
pub use self::endpoint::ClientTlsConfig;
Expand Down

0 comments on commit 2969071

Please sign in to comment.