mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-23 10:41:05 +00:00
Touch up PR 2795
This commit is contained in:
@@ -3027,7 +3027,8 @@ fn effective_style(variant: &Variant) -> Style {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if there are fields that is not skipped and has a `#[serde(flatten)]` attribute.
|
/// True if there is any field with a `#[serde(flatten)]` attribute, other than
|
||||||
|
/// fields which are skipped.
|
||||||
fn has_flatten(fields: &[Field]) -> bool {
|
fn has_flatten(fields: &[Field]) -> bool {
|
||||||
fields
|
fields
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ fn serialize_struct(params: &Parameters, fields: &[Field], cattrs: &attr::Contai
|
|||||||
"too many fields in {}: {}, maximum supported count is {}",
|
"too many fields in {}: {}, maximum supported count is {}",
|
||||||
cattrs.name().serialize_name(),
|
cattrs.name().serialize_name(),
|
||||||
fields.len(),
|
fields.len(),
|
||||||
u32::MAX
|
u32::MAX,
|
||||||
);
|
);
|
||||||
|
|
||||||
let has_non_skipped_flatten = fields
|
let has_non_skipped_flatten = fields
|
||||||
|
|||||||
Reference in New Issue
Block a user