mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 23:41:03 +00:00
Adressed concerns raised by @oli-obk.
Specifically: - Change identation in `de.rs`. - Make `attr::Field` take a `attr::Default` as opposed to the entire parent `attr::Container`.
This commit is contained in:
@@ -451,15 +451,15 @@ fn deserialize_seq(
|
||||
attr::Default::Default => {
|
||||
Some(
|
||||
quote!(
|
||||
let __default: Self::Value = _serde::export::Default::default();
|
||||
),
|
||||
let __default: Self::Value = _serde::export::Default::default();
|
||||
),
|
||||
)
|
||||
}
|
||||
attr::Default::Path(ref path) => {
|
||||
Some(
|
||||
quote!(
|
||||
let __default: Self::Value = #path();
|
||||
),
|
||||
let __default: Self::Value = #path();
|
||||
),
|
||||
)
|
||||
}
|
||||
attr::Default::None => {
|
||||
@@ -1724,15 +1724,15 @@ fn deserialize_map(
|
||||
attr::Default::Default => {
|
||||
Some(
|
||||
quote!(
|
||||
let __default: Self::Value = _serde::export::Default::default();
|
||||
),
|
||||
let __default: Self::Value = _serde::export::Default::default();
|
||||
),
|
||||
)
|
||||
}
|
||||
attr::Default::Path(ref path) => {
|
||||
Some(
|
||||
quote!(
|
||||
let __default: Self::Value = #path();
|
||||
),
|
||||
let __default: Self::Value = #path();
|
||||
),
|
||||
)
|
||||
}
|
||||
attr::Default::None => {
|
||||
|
||||
Reference in New Issue
Block a user