Skip to content

Commit f679dcf

Browse files
authored
feat(router): Reexport axum type without server feature (#1755)
1 parent 6a213e9 commit f679dcf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/src/h2c/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ mod h2c {
7171
use http::{Request, Response};
7272
use hyper::body::Incoming;
7373
use hyper_util::{rt::TokioExecutor, service::TowerToHyperService};
74-
use tonic::{body::empty_body, transport::AxumBody};
74+
use tonic::{body::empty_body, service::AxumBody};
7575
use tower::Service;
7676

7777
#[derive(Clone)]

tonic/src/service/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ pub use self::interceptor::{interceptor, Interceptor};
99
#[doc(inline)]
1010
#[cfg(feature = "router")]
1111
pub use self::router::{Routes, RoutesBuilder};
12+
#[cfg(feature = "router")]
13+
pub use axum::{body::Body as AxumBody, Router as AxumRouter};

tonic/src/transport/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ pub use self::service::grpc_timeout::TimeoutExpired;
111111

112112
#[cfg(feature = "tls")]
113113
pub use self::tls::Certificate;
114-
#[cfg(feature = "server")]
115-
pub use axum::{body::Body as AxumBody, Router as AxumRouter};
116114
pub use hyper::{body::Body, Uri};
117115
#[cfg(feature = "tls")]
118116
pub use tokio_rustls::rustls::pki_types::CertificateDer;

0 commit comments

Comments
 (0)