Skip to content

Commit

Permalink
refactor(derive): Clarify the kinds of methods
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jun 14, 2022
1 parent 89beb28 commit ce5cc92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clap_derive/src/derives/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ pub fn gen_augment(
quote!()
};

let modifier = match **ty {
let implicit_methods = match **ty {
Ty::Option => {
quote_spanned! { ty.span()=>
.takes_value(true)
Expand Down Expand Up @@ -403,13 +403,13 @@ pub fn gen_augment(
};

let id = attrs.id();
let methods = attrs.field_methods(true);
let explicit_methods = attrs.field_methods(true);

Some(quote_spanned! { field.span()=>
let #app_var = #app_var.arg(
clap::Arg::new(#id)
#modifier
#methods
#implicit_methods
#explicit_methods
);
})
}
Expand Down

0 comments on commit ce5cc92

Please sign in to comment.