diff options
author | Alex Auvolat <alex@adnab.me> | 2023-06-14 14:15:51 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-06-14 14:15:51 +0200 |
commit | 4a82f6380e6a7d7c841477fc914fd96e6c09adad (patch) | |
tree | e53029ebd17f0b9d872880d115edab08b9db4e64 /src/api/router_macros.rs | |
parent | 28cc9f178a1368e53143aab663577b0ffbf50b35 (diff) | |
download | garage-4a82f6380e6a7d7c841477fc914fd96e6c09adad.tar.gz garage-4a82f6380e6a7d7c841477fc914fd96e6c09adad.zip |
admin api: move all endpoints to v1/ by default (v0/ still supported)
Diffstat (limited to 'src/api/router_macros.rs')
-rw-r--r-- | src/api/router_macros.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/api/router_macros.rs b/src/api/router_macros.rs index 07b5570c..cfecbc92 100644 --- a/src/api/router_macros.rs +++ b/src/api/router_macros.rs @@ -26,6 +26,7 @@ macro_rules! router_match { $($meth:ident $path:pat $(if $required:ident)? => $api:ident $(($($conv:ident :: $param:ident),*))?,)* ]) => {{ { + #[allow(unused_parens)] match ($method, $reqpath) { $( (&Method::$meth, $path) if true $(&& $query.$required.is_some())? => Endpoint::$api { @@ -128,12 +129,6 @@ macro_rules! router_match { } } }; - (@if ($($cond:tt)+) then ($($then:tt)*) else ($($else:tt)*)) => { - $($then)* - }; - (@if () then ($($then:tt)*) else ($($else:tt)*)) => { - $($else)* - }; } /// This macro is used to generate part of the code in this module. It must be called only one, and |