mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
refactor: finishing touches to make most of the tests pass
This commit is contained in:
parent
6b45f8d275
commit
521a7dcd42
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue