mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 19:01:02 +00:00
Format with rustfmt 2018-12-10
This commit is contained in:
@@ -410,11 +410,11 @@ impl Container {
|
||||
syn::Data::Enum(_) => {
|
||||
internal_tag.set(&m.ident, s.value());
|
||||
}
|
||||
syn::Data::Struct(syn::DataStruct{ref fields, ..}) => {
|
||||
syn::Data::Struct(syn::DataStruct { ref fields, .. }) => {
|
||||
match *fields {
|
||||
syn::Fields::Named(_) => {
|
||||
internal_tag.set(&m.ident, s.value());
|
||||
},
|
||||
}
|
||||
syn::Fields::Unnamed(_) | syn::Fields::Unit => {
|
||||
cx.error_spanned_by(
|
||||
fields,
|
||||
@@ -430,7 +430,7 @@ impl Container {
|
||||
cx.error_spanned_by(
|
||||
union_token,
|
||||
"#[serde(tag = \"...\")] can only be used on enums \
|
||||
and structs with named fields",
|
||||
and structs with named fields",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use internals::ast::{Container, Data, Field, Style};
|
||||
use internals::attr::{TagType, Identifier};
|
||||
use internals::attr::{Identifier, TagType};
|
||||
use internals::{Ctxt, Derive};
|
||||
use syn::{Member, Type};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user