Skip to content

Commit b2c277e

Browse files
SnakeOilSalesmanRahix
authored andcommitted
Apply minor code-style fixes to make formatter happy
1 parent a4a8bd8 commit b2c277e

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

macros/src/lib.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ pub fn interrupt(
119119
args: proc_macro::TokenStream,
120120
input: proc_macro::TokenStream,
121121
) -> proc_macro::TokenStream {
122-
let mut f: syn::ItemFn = syn::parse(input).expect("`#[interrupt]` must be applied to a function");
122+
let mut f: syn::ItemFn =
123+
syn::parse(input).expect("`#[interrupt]` must be applied to a function");
123124
let args: Vec<_> = args.into_iter().collect();
124125

125126
let fspan = f.span();
@@ -176,17 +177,25 @@ pub fn interrupt(
176177
Ok(x) => x,
177178
};
178179

179-
f.sig.ident = syn::Ident::new(&format!("__avr_device_rt_{}", f.sig.ident), proc_macro2::Span::call_site());
180+
f.sig.ident = syn::Ident::new(
181+
&format!("__avr_device_rt_{}", f.sig.ident),
182+
proc_macro2::Span::call_site(),
183+
);
180184
f.sig.inputs.extend(statics.iter().map(|statik| {
181185
let ident = &statik.ident;
182186
let ty = &statik.ty;
183187
let attrs = &statik.attrs;
184-
syn::parse::<syn::FnArg>(quote::quote!(#[allow(non_snake_case)] #(#attrs)* #ident: &mut #ty).into())
185-
.unwrap()
188+
syn::parse::<syn::FnArg>(
189+
quote::quote!(#[allow(non_snake_case)] #(#attrs)* #ident: &mut #ty).into(),
190+
)
191+
.unwrap()
186192
}));
187193
f.block.stmts = stmts;
188194

189-
let tramp_ident = syn::Ident::new(&format!("{}_trampoline", f.sig.ident), proc_macro2::Span::call_site());
195+
let tramp_ident = syn::Ident::new(
196+
&format!("{}_trampoline", f.sig.ident),
197+
proc_macro2::Span::call_site(),
198+
);
190199
let ident = &f.sig.ident;
191200

192201
let resource_args = statics

src/devices/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#[no_mangle]
44
pub(crate) static mut DEVICE_PERIPHERALS: bool = false;
55

6-
76
/// [AT90USB1286](https://www.microchip.com/wwwproducts/en/AT90USB1286)
87
#[cfg(feature = "at90usb1286")]
98
pub mod at90usb1286;

0 commit comments

Comments
 (0)