mirror of
https://github.com/Drop-OSS/interactive-clap.git
synced 2026-07-19 20:03:34 -04:00
fixed
This commit is contained in:
@@ -99,13 +99,6 @@ fn fields_value(field: &syn::Field) -> proc_macro2::TokenStream {
|
||||
let ident_field = &field.clone().ident.expect("this field does not exist");
|
||||
let fn_from_cli_arg = syn::Ident::new(&format!("from_cli_{}", &ident_field), Span::call_site());
|
||||
if super::fields_without_subcommand::is_field_without_subcommand(field) {
|
||||
let type_string = match &field.ty {
|
||||
syn::Type::Path(type_path) => match type_path.path.segments.last() {
|
||||
Some(path_segment) => path_segment.ident.to_string(),
|
||||
_ => String::new(),
|
||||
},
|
||||
_ => String::new(),
|
||||
};
|
||||
quote! {
|
||||
let #ident_field = Self::#fn_from_cli_arg(
|
||||
optional_clap_variant
|
||||
|
||||
+9
-9
@@ -43,22 +43,22 @@ impl InteractiveClapAttrsContext {
|
||||
};
|
||||
}
|
||||
};
|
||||
let context_dir: Option<proc_macro2::TokenStream> = if let true = !context_dir.is_empty() {
|
||||
Some(context_dir)
|
||||
} else {
|
||||
let context_dir: Option<proc_macro2::TokenStream> = if context_dir.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(context_dir)
|
||||
};
|
||||
let input_context_dir: Option<proc_macro2::TokenStream> =
|
||||
if let true = !input_context_dir.is_empty() {
|
||||
Some(input_context_dir)
|
||||
} else {
|
||||
if input_context_dir.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(input_context_dir)
|
||||
};
|
||||
let output_context_dir: Option<proc_macro2::TokenStream> =
|
||||
if let true = !output_context_dir.is_empty() {
|
||||
Some(output_context_dir)
|
||||
} else {
|
||||
if output_context_dir.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(output_context_dir)
|
||||
};
|
||||
Self {
|
||||
context_dir,
|
||||
|
||||
Reference in New Issue
Block a user