aboutsummaryrefslogtreecommitdiff
path: root/src/urls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/urls.rs')
-rw-r--r--src/urls.rs10
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()
}};