Use as
instead of immediately-invoked typed function
This commit is contained in:
parent
b38a55331b
commit
feb6c4b2fe
1 changed files with 1 additions and 1 deletions
|
@ -581,7 +581,7 @@ fn field_default_expr(field: &Field, container_has_default: bool) -> Option<Toke
|
|||
quote!(container_default.#member)
|
||||
}
|
||||
SerdeDefault::Default => quote!(<#ty>::default()),
|
||||
SerdeDefault::Path(path) => quote!(|| -> #ty { #path() }()),
|
||||
SerdeDefault::Path(path) => quote!({ #path() as #ty }),
|
||||
};
|
||||
|
||||
let default_expr = match field.serde_attrs.skip_serializing_if() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue