mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 21:48:02 +00:00
Format with rustfmt 0.8.2
This commit is contained in:
@@ -348,7 +348,10 @@ 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,
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![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]
|
||||
|
||||
@@ -198,7 +198,12 @@ 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",
|
||||
@@ -206,7 +211,8 @@ fn test_gen() {
|
||||
)]
|
||||
d: D,
|
||||
#[serde(
|
||||
serialize_with = "SerializeWith::serialize_with", bound(serialize = "E: SerializeWith")
|
||||
serialize_with = "SerializeWith::serialize_with",
|
||||
bound(serialize = "E: SerializeWith")
|
||||
)]
|
||||
#[serde(
|
||||
deserialize_with = "DeserializeWith::deserialize_with",
|
||||
@@ -234,7 +240,12 @@ 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",
|
||||
@@ -242,7 +253,8 @@ fn test_gen() {
|
||||
)]
|
||||
D(D),
|
||||
#[serde(
|
||||
serialize_with = "SerializeWith::serialize_with", bound(serialize = "E: SerializeWith")
|
||||
serialize_with = "SerializeWith::serialize_with",
|
||||
bound(serialize = "E: SerializeWith")
|
||||
)]
|
||||
#[serde(
|
||||
deserialize_with = "DeserializeWith::deserialize_with",
|
||||
|
||||
Reference in New Issue
Block a user