mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-23 00:11:02 +00:00
Format PR 1791 with rustfmt
This commit is contained in:
@@ -594,12 +594,11 @@ impl Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use proc_macro2::Delimiter;
|
use proc_macro2::Delimiter;
|
||||||
let is_packed = item.attrs.iter().any(|attr| {
|
let is_packed = item.attrs.iter().any(|attr| match attr.style {
|
||||||
match attr.style {
|
syn::AttrStyle::Outer => {
|
||||||
syn::AttrStyle::Outer => attr
|
attr.path
|
||||||
.path
|
.get_ident()
|
||||||
.get_ident()
|
.map_or(false, |ident| *ident == "repr")
|
||||||
.map_or(false, |ident| *ident == "repr")
|
|
||||||
&& syn::parse2::<Group>(attr.tokens.clone())
|
&& syn::parse2::<Group>(attr.tokens.clone())
|
||||||
.ok()
|
.ok()
|
||||||
.filter(|g| g.delimiter() == Delimiter::Parenthesis)
|
.filter(|g| g.delimiter() == Delimiter::Parenthesis)
|
||||||
@@ -609,9 +608,9 @@ impl Container {
|
|||||||
repr == "packed"
|
repr == "packed"
|
||||||
|| repr.starts_with("packed(")
|
|| repr.starts_with("packed(")
|
||||||
|| repr.starts_with("packed ")
|
|| repr.starts_with("packed ")
|
||||||
}),
|
})
|
||||||
_ => false
|
|
||||||
}
|
}
|
||||||
|
_ => false,
|
||||||
});
|
});
|
||||||
|
|
||||||
Container {
|
Container {
|
||||||
|
|||||||
Reference in New Issue
Block a user