mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-17 03:26:20 +00:00
config_macros.rs: don't skip nonmatching attributes
config_macros.rs contains a macro that parses config structs and generates a new "override" struct that contains the fields as Options. The macro matches on each field's attributes and removes the serde "default" attributes, since the override default is always None. However, if an attribute contained a group of values and the first wasn't `default` the attribute was skipped, so don't do that.
This commit is contained in:
parent
bfc08f892d
commit
839d2f3d80
@ -102,7 +102,7 @@ use super::*;
|
||||
if !attr_inner_value.starts_with("( default")
|
||||
&& !attr_inner_value.starts_with("( default =")
|
||||
{
|
||||
return None;
|
||||
return Some(new_attr);
|
||||
}
|
||||
if attr_inner_value.starts_with("( default =") {
|
||||
let rest = g.stream().clone().into_iter().skip(4);
|
||||
|
Loading…
Reference in New Issue
Block a user