Skip to content

Commit f61d452

Browse files
committed
Touch up PR 2795
1 parent f986609 commit f61d452

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

serde_derive/src/de.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3027,7 +3027,8 @@ fn effective_style(variant: &Variant) -> Style {
30273027
}
30283028
}
30293029

3030-
/// True if there are fields that is not skipped and has a `#[serde(flatten)]` attribute.
3030+
/// True if there is any field with a `#[serde(flatten)]` attribute, other than
3031+
/// fields which are skipped.
30313032
fn has_flatten(fields: &[Field]) -> bool {
30323033
fields
30333034
.iter()

serde_derive/src/ser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ fn serialize_struct(params: &Parameters, fields: &[Field], cattrs: &attr::Contai
294294
"too many fields in {}: {}, maximum supported count is {}",
295295
cattrs.name().serialize_name(),
296296
fields.len(),
297-
u32::MAX
297+
u32::MAX,
298298
);
299299

300300
let has_non_skipped_flatten = fields

0 commit comments

Comments
 (0)