From 7c51fdbda4a520341bbae41740438bb375bc41ec Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 31 Jan 2021 00:48:35 +0000 Subject: [PATCH] daemon: api route macros: tolerate attrs on structs Signed-off-by: Ian Jackson --- daemon/api.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/api.rs b/daemon/api.rs index 82ffe356..9fa89756 100644 --- a/daemon/api.rs +++ b/daemon/api.rs @@ -195,22 +195,22 @@ macro_rules! api_route_core { macro_rules! api_route { { $fn:ident, $path:expr, - struct $form:ident { $( $body:tt )* } + $( #[ $attrs:meta ] )* struct $form:ident { $( $body:tt )* } $( $impl:tt )* } => { api_route_core!{ $fn, $path, $form, - struct $form { $( $body )* }, + $( #[ $attrs ] )* struct $form { $( $body )* }, $( $impl )* } }; { $fn:ident, $path:expr, - struct $form:ident ( $( $body:tt )* ); + $( #[ $attrs:meta ] )* struct $form:ident ( $( $body:tt )* ); $( $impl:tt )* } => { api_route_core!{ $fn, $path, $form, - struct $form ( $( $body )* );, + $( #[ $attrs ] )* struct $form ( $( $body )* );, $( $impl )* } } -- 2.30.2