mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 16:17:55 +00:00
Format with rustfmt 1.0.0-nightly
This commit is contained in:
@@ -351,10 +351,7 @@ struct ContainsNotDeserialize<A, B, C: DeserializeWith, E: MyDefault> {
|
||||
a: A,
|
||||
#[serde(skip_deserializing, default)]
|
||||
b: B,
|
||||
#[serde(
|
||||
deserialize_with = "DeserializeWith::deserialize_with",
|
||||
default
|
||||
)]
|
||||
#[serde(deserialize_with = "DeserializeWith::deserialize_with", default)]
|
||||
c: C,
|
||||
#[serde(skip_deserializing, default = "MyDefault::my_default")]
|
||||
e: E,
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(decimal_literal_representation)
|
||||
)]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(decimal_literal_representation))]
|
||||
#![cfg_attr(feature = "unstable", feature(never_type))]
|
||||
|
||||
#[macro_use]
|
||||
@@ -229,7 +226,8 @@ fn assert_de_tokens_ignore(ignorable_tokens: &[Token]) {
|
||||
Token::Str("a"),
|
||||
Token::I32(1),
|
||||
Token::Str("ignored"),
|
||||
].into_iter()
|
||||
]
|
||||
.into_iter()
|
||||
.chain(ignorable_tokens.to_vec().into_iter())
|
||||
.chain(vec![Token::MapEnd].into_iter())
|
||||
.collect();
|
||||
|
||||
@@ -198,10 +198,7 @@ fn test_gen() {
|
||||
assert::<WithTraits1<X, X>>();
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(bound(
|
||||
serialize = "D: SerializeWith",
|
||||
deserialize = "D: DeserializeWith"
|
||||
))]
|
||||
#[serde(bound(serialize = "D: SerializeWith", deserialize = "D: DeserializeWith"))]
|
||||
struct WithTraits2<D, E> {
|
||||
#[serde(
|
||||
serialize_with = "SerializeWith::serialize_with",
|
||||
@@ -238,10 +235,7 @@ fn test_gen() {
|
||||
assert::<VariantWithTraits1<X, X>>();
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(bound(
|
||||
serialize = "D: SerializeWith",
|
||||
deserialize = "D: DeserializeWith"
|
||||
))]
|
||||
#[serde(bound(serialize = "D: SerializeWith", deserialize = "D: DeserializeWith"))]
|
||||
enum VariantWithTraits2<D, E> {
|
||||
#[serde(
|
||||
serialize_with = "SerializeWith::serialize_with",
|
||||
|
||||
Reference in New Issue
Block a user