From 521a7dcd42d33ef697527f10b3f13c49482d34f6 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Sun, 8 Jul 2018 22:07:49 -0400 Subject: [PATCH] refactor: finishing touches to make most of the tests pass --- src/derives/attrs.rs | 4 ++-- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/derives/attrs.rs b/src/derives/attrs.rs index 1226ba77..2944c853 100644 --- a/src/derives/attrs.rs +++ b/src/derives/attrs.rs @@ -96,10 +96,10 @@ impl Attrs { .iter() .filter_map(|attr| { let path = &attr.path; - match quote!(#path).to_string() == "structopt" { + match quote!(#path).to_string() == "clap" { true => Some( attr.interpret_meta() - .expect(&format!("invalid structopt syntax: {}", quote!(attr))), + .expect(&format!("invalid clap_derive syntax: {}", quote!(attr))), ), false => None, } diff --git a/src/lib.rs b/src/lib.rs index b7a9f036..fc79f242 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ pub fn clap(input: proc_macro::TokenStream) -> proc_macro::TokenStream { } /// Generates the `IntoApp` impl. -#[proc_macro_derive(IntoApp)] +#[proc_macro_derive(IntoApp, attributes(clap))] pub fn into_app(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input: syn::DeriveInput = syn::parse(input).unwrap(); derives::derive_into_app(&input).into()