Fix unused import warnings
This commit is contained in:
parent
403b308279
commit
02ae53e71b
3 changed files with 5 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::fmt::{assert, *};
|
||||
use crate::fmt::assert;
|
||||
|
||||
pub struct RingBuffer<'a> {
|
||||
buf: &'a mut [u8],
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
use darling::FromMeta;
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::{format_ident, quote};
|
||||
use syn::spanned::Spanned;
|
||||
use quote::quote;
|
||||
|
||||
#[derive(Debug, FromMeta)]
|
||||
pub struct Args {}
|
||||
|
||||
pub fn generate(args: Args) -> TokenStream {
|
||||
pub fn generate(_args: Args) -> TokenStream {
|
||||
quote!(
|
||||
use embassy_rp::{interrupt, peripherals};
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ mod chip;
|
|||
#[proc_macro_attribute]
|
||||
pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
let macro_args = syn::parse_macro_input!(args as syn::AttributeArgs);
|
||||
let mut task_fn = syn::parse_macro_input!(item as syn::ItemFn);
|
||||
let task_fn = syn::parse_macro_input!(item as syn::ItemFn);
|
||||
|
||||
let macro_args = match chip::Args::from_list(¯o_args) {
|
||||
Ok(v) => v,
|
||||
|
@ -236,9 +236,7 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
|
|||
fail = true;
|
||||
}
|
||||
|
||||
let mut arg_names: syn::punctuated::Punctuated<syn::Ident, syn::Token![,]> =
|
||||
syn::punctuated::Punctuated::new();
|
||||
let mut args = task_fn.sig.inputs.clone();
|
||||
let args = task_fn.sig.inputs.clone();
|
||||
|
||||
if args.len() != 1 {
|
||||
task_fn
|
||||
|
@ -254,9 +252,7 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
|
|||
return TokenStream::new();
|
||||
}
|
||||
|
||||
let name = task_fn.sig.ident.clone();
|
||||
let task_fn_body = task_fn.block.clone();
|
||||
|
||||
let chip_setup = chip::generate(macro_args);
|
||||
|
||||
let result = quote! {
|
||||
|
|
Loading…
Reference in a new issue