diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-13 20:48:15 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-13 20:48:15 -0600 |
commit | d30b5db6f3eabd2a550ef05e6203d3c7ef19e9c7 (patch) | |
tree | 073f2781edb4b08841ea7cf6098371e2d994d7c8 /src/urls.rs | |
parent | 75e5e5f857b50a0eedbde84bcb10035479fc4571 (diff) | |
download | tosin-d30b5db6f3eabd2a550ef05e6203d3c7ef19e9c7.tar.gz tosin-d30b5db6f3eabd2a550ef05e6203d3c7ef19e9c7.zip |
pass the first halfish of tutorial 1 tests
Diffstat (limited to 'src/urls.rs')
-rw-r--r-- | src/urls.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/urls.rs b/src/urls.rs index 80eba9e..2668835 100644 --- a/src/urls.rs +++ b/src/urls.rs @@ -1,6 +1,8 @@ use crate::http::Response; pub use crate::url_map; +pub use warp::path as warp_path; + pub type UrlMap = warp::filters::BoxedFilter<(Response,)>; #[doc(hidden)] @@ -40,20 +42,20 @@ macro_rules! __url_map_inner { ($chain:ident @rest) => { $chain }; (@one => $view:expr) => { - ::warp::path::end().map($view) + $crate::urls::warp_path::end().map($view) }; (@one $head:tt $(/ $tail:tt)* => $view:expr) => { - ::warp::path!($head $(/ $tail)*).map($view) + $crate::urls::warp_path!($head $(/ $tail)*).map($view) }; (@one $head:tt $(/ $tail:tt)* $child:expr) => { - ::warp::path!($head $(/ $tail)*).and($child) + $crate::urls::warp_path!($head $(/ $tail)*).and($child) }; } #[macro_export] macro_rules! url_map { ($($body:tt)*) => {{ - use ::warp::Filter; + use $crate::http::Filter; $crate::__url_map_inner!(@root $($body)*) .boxed() }}; |