Fix compile time regression by boxing routes internally (#404)

This is a reimplementation of #401 but with the new matchit based router.

Fixes #399
This commit is contained in:
David Pedersen
2021-10-24 20:52:42 +02:00
committed by GitHub
parent 1a764bb8d7
commit 0ee7379d4f
13 changed files with 203 additions and 242 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ use tower_service::Service;
///
/// [`Router::or`]: super::Router::or
#[derive(Debug, Clone, Copy)]
pub struct Or<A, B> {
pub(crate) struct Or<A, B> {
pub(super) first: A,
pub(super) second: B,
}
@@ -62,7 +62,7 @@ where
pin_project! {
/// Response future for [`Or`].
pub struct ResponseFuture<A, B, ReqBody>
pub(crate) struct ResponseFuture<A, B, ReqBody>
where
A: Service<Request<ReqBody>>,
B: Service<Request<ReqBody>>,