mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 21:21:02 +00:00
Merge pull request #3001 from nik-contrib/refactor
refactor: remove 1 level of nesting
This commit is contained in:
@@ -1185,13 +1185,11 @@ impl Field {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is skip_deserializing, initialize the field to Default::default() unless a
|
// If skip_deserializing, initialize the field to Default::default() unless a
|
||||||
// different default is specified by `#[serde(default = "...")]` on
|
// different default is specified by `#[serde(default = "...")]` on
|
||||||
// ourselves or our container (e.g. the struct we are in).
|
// ourselves or our container (e.g. the struct we are in).
|
||||||
if let Default::None = *container_default {
|
if container_default.is_none() && skip_deserializing.0.value.is_some() {
|
||||||
if skip_deserializing.0.value.is_some() {
|
default.set_if_none(Default::Default);
|
||||||
default.set_if_none(Default::Default);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut borrowed_lifetimes = borrowed_lifetimes.get().unwrap_or_default();
|
let mut borrowed_lifetimes = borrowed_lifetimes.get().unwrap_or_default();
|
||||||
|
|||||||
Reference in New Issue
Block a user