From f0b6e7159146dfb805d1c740af3606f0f4d53f99 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Tue, 25 Jun 2019 03:17:05 -0400 Subject: [PATCH] Adjusting the attribute location in c_structs. --- src/c_struct.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/c_struct.rs b/src/c_struct.rs index 736a213..e812e75 100644 --- a/src/c_struct.rs +++ b/src/c_struct.rs @@ -5,16 +5,14 @@ macro_rules! c_struct { $cname: ident { - $(#[$attr: meta])* - $($name: ident: $type: ty);*; + $($(#[$attr: meta])* $name: ident: $type: ty);*; } } => { #[repr(C)] pub struct $cname { - $(#[$attr])* - $(pub $name: $type),+, + $($(#[$attr])* pub $name: $type),+, } }; }