refactor: finishing touches to make most of the tests pass

This commit is contained in:
Kevin K 2018-07-08 22:07:49 -04:00
parent 6b45f8d275
commit 521a7dcd42
No known key found for this signature in database
GPG key ID: 17218E4B3692F01A
2 changed files with 3 additions and 3 deletions

View file

@ -96,10 +96,10 @@ impl Attrs {
.iter() .iter()
.filter_map(|attr| { .filter_map(|attr| {
let path = &attr.path; let path = &attr.path;
match quote!(#path).to_string() == "structopt" { match quote!(#path).to_string() == "clap" {
true => Some( true => Some(
attr.interpret_meta() attr.interpret_meta()
.expect(&format!("invalid structopt syntax: {}", quote!(attr))), .expect(&format!("invalid clap_derive syntax: {}", quote!(attr))),
), ),
false => None, false => None,
} }

View file

@ -40,7 +40,7 @@ pub fn clap(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
} }
/// Generates the `IntoApp` impl. /// 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 { pub fn into_app(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input: syn::DeriveInput = syn::parse(input).unwrap(); let input: syn::DeriveInput = syn::parse(input).unwrap();
derives::derive_into_app(&input).into() derives::derive_into_app(&input).into()