add README description
This commit is contained in:
@ -62,7 +62,6 @@ fn generate_helper_struct(
|
||||
let mut new_type_miniconf_names = vec![];
|
||||
let mut new_type_miniconf_consts = vec![];
|
||||
let mut extra_new_checks = TokenStream2::new();
|
||||
let mut generate_new_type = false;
|
||||
for attr in &field.attrs {
|
||||
if let Some((new_type_impl, new_check, const_ident, key)) =
|
||||
parse_min(&new_type_ident, attr, &ty)
|
||||
@ -71,7 +70,6 @@ fn generate_helper_struct(
|
||||
new_type_miniconf_consts.push(const_ident);
|
||||
new_type_miniconf_names.push(key);
|
||||
extra_new_checks.extend(new_check);
|
||||
generate_new_type = true;
|
||||
}
|
||||
if let Some((new_type_impl, new_check, const_ident, key)) =
|
||||
parse_max(&new_type_ident, attr, &ty)
|
||||
@ -80,13 +78,11 @@ fn generate_helper_struct(
|
||||
new_type_miniconf_consts.push(const_ident);
|
||||
new_type_miniconf_names.push(key);
|
||||
extra_new_checks.extend(new_check);
|
||||
generate_new_type = true;
|
||||
}
|
||||
if let Some((new_type_impl, const_ident, key)) = parse_default(&new_type_ident, attr, &ty) {
|
||||
new_type_impls.extend(new_type_impl);
|
||||
new_type_miniconf_consts.push(const_ident);
|
||||
new_type_miniconf_names.push(key);
|
||||
generate_new_type = true;
|
||||
}
|
||||
if let Some((new_type_impl, const_ident, key)) = parse_description(&new_type_ident, attr) {
|
||||
new_type_impls.extend(new_type_impl);
|
||||
@ -94,7 +90,7 @@ fn generate_helper_struct(
|
||||
new_type_miniconf_names.push(key);
|
||||
}
|
||||
}
|
||||
if !generate_new_type {
|
||||
if new_type_miniconf_names.is_empty() {
|
||||
return None;
|
||||
}
|
||||
field.attrs.retain(|attr| {
|
||||
|
Reference in New Issue
Block a user