diff options
Diffstat (limited to 'src/response/macros.rs')
| -rw-r--r-- | src/response/macros.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/response/macros.rs b/src/response/macros.rs index 1d13c8f..10f6b06 100644 --- a/src/response/macros.rs +++ b/src/response/macros.rs @@ -23,10 +23,10 @@ macro_rules! sync_response { #[macro_export] macro_rules! $name { ($body:expr /* $(,)? */) => { - |_: ::windmark::context::RouteContext| ::windmark::Response::$name($body) + |_: $crate::context::RouteContext| $crate::Response::$name($body) }; ($context:ident, $body:expr /* $(,)? */) => { - |$context: ::windmark::context::RouteContext| ::windmark::Response::$name($body) + |$context: $crate::context::RouteContext| $crate::Response::$name($body) }; } )* @@ -40,10 +40,10 @@ macro_rules! async_response { #[macro_export] macro_rules! [< $name _async >] { ($body:expr /* $(,)? */) => { - |_: ::windmark::context::RouteContext| async { ::windmark::Response::$name($body) } + |_: $crate::context::RouteContext| async { $crate::Response::$name($body) } }; ($context:ident, $body:expr /* $(,)? */) => { - |$context: ::windmark::context::RouteContext| async { ::windmark::Response::$name($body) } + |$context: $crate::context::RouteContext| async { $crate::Response::$name($body) } }; } })* @@ -86,8 +86,8 @@ response!(binary_success_auto); #[macro_export] macro_rules! binary_success { ($body:expr, $mime:expr) => { - |_: ::windmark::context::RouteContext| { - ::windmark::Response::binary_success($body, $mime) + |_: $crate::context::RouteContext| { + $crate::Response::binary_success($body, $mime) } }; ($body:expr) => {{ @@ -97,18 +97,18 @@ macro_rules! binary_success { feature to be enabled" ); - |_: ::windmark::context::RouteContext| { + |_: $crate::context::RouteContext| { #[cfg(feature = "auto-deduce-mime")] - return ::windmark::Response::binary_success_auto($body); + return $crate::Response::binary_success_auto($body); // Suppress item not found warning #[cfg(not(feature = "auto-deduce-mime"))] - ::windmark::Response::binary_success($body, "application/octet-stream") + $crate::Response::binary_success($body, "application/octet-stream") } }}; ($context:ident, $body:expr, $mime:expr) => { - |$context: ::windmark::context::RouteContext| { - ::windmark::Response::binary_success($body, $mime) + |$context: $crate::context::RouteContext| { + $crate::Response::binary_success($body, $mime) } }; ($context:ident, $body:expr) => {{ @@ -118,13 +118,13 @@ macro_rules! binary_success { feature to be enabled" ); - |$context: ::windmark::context::RouteContext| { + |$context: $crate::context::RouteContext| { #[cfg(feature = "auto-deduce-mime")] - return ::windmark::Response::binary_success_auto($body); + return $crate::Response::binary_success_auto($body); // Suppress item not found warning #[cfg(not(feature = "auto-deduce-mime"))] - ::windmark::Response::binary_success($body, "application/octet-stream") + $crate::Response::binary_success($body, "application/octet-stream") } }}; } |