Skip to content

Commit

Permalink
feat(router): Reexport axum type without server feature (hyperium#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Jun 24, 2024
1 parent 6a213e9 commit f679dcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/src/h2c/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mod h2c {
use http::{Request, Response};
use hyper::body::Incoming;
use hyper_util::{rt::TokioExecutor, service::TowerToHyperService};
use tonic::{body::empty_body, transport::AxumBody};
use tonic::{body::empty_body, service::AxumBody};
use tower::Service;

#[derive(Clone)]
Expand Down
2 changes: 2 additions & 0 deletions tonic/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ pub use self::interceptor::{interceptor, Interceptor};
#[doc(inline)]
#[cfg(feature = "router")]
pub use self::router::{Routes, RoutesBuilder};
#[cfg(feature = "router")]
pub use axum::{body::Body as AxumBody, Router as AxumRouter};
2 changes: 0 additions & 2 deletions tonic/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ pub use self::service::grpc_timeout::TimeoutExpired;

#[cfg(feature = "tls")]
pub use self::tls::Certificate;
#[cfg(feature = "server")]
pub use axum::{body::Body as AxumBody, Router as AxumRouter};
pub use hyper::{body::Body, Uri};
#[cfg(feature = "tls")]
pub use tokio_rustls::rustls::pki_types::CertificateDer;
Expand Down

0 comments on commit f679dcf

Please sign in to comment.