From 62ad7709991bb93a9e363b54855ed631c23c546a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 25 Apr 2022 23:49:40 +0100 Subject: [PATCH] fix serde_with_compat attribute syntax Signed-off-by: Ian Jackson --- src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 5fb808ef..b9e1b151 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -435,16 +435,16 @@ macro_rules! want_let { /// in the serde attribute. #[macro_export] macro_rules! serde_with_compat { { - [ #[ $($attrs:meta)* ] ] [ $vis:vis ] [ $($intro:tt)* ] + [ $( #[ $($attrs:meta)* ] )* ] [ $vis:vis ] [ $($intro:tt)* ] $main:ident=$main_s:literal $new:ident $compat_s:literal [ $($body:tt)* ] } => { - $(#[ $attrs ])* + $(#[ $($attrs)* ])* #[serde(try_from=$compat_s)] $vis $($intro)* $main $($body)* #[allow(non_camel_case_types)] - $(#[ $attrs ])* + $(#[ $($attrs)* ])* #[serde(remote=$main_s)] $($intro)* $new $($body)* } } -- 2.30.2