From 5985b7edaf1703b6b6d8733a7b782f9247315128 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 14 Aug 2018 19:59:20 -0700 Subject: [PATCH] Format with rustfmt 0.99.2 --- serde/src/de/impls.rs | 60 +++++++++++++++--------------------- test_suite/tests/test_gen.rs | 20 +++++------- 2 files changed, 33 insertions(+), 47 deletions(-) diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index f22c5fe0..6c4ad5ea 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -1602,13 +1602,11 @@ forwarded_impl!((T), Box<[T]>, Vec::into_boxed_slice); #[cfg(any(feature = "std", feature = "alloc"))] forwarded_impl!((), Box, String::into_boxed_str); -#[cfg( - all( - not(de_rc_dst), - feature = "rc", - any(feature = "std", feature = "alloc") - ) -)] +#[cfg(all( + not(de_rc_dst), + feature = "rc", + any(feature = "std", feature = "alloc") +))] forwarded_impl! { /// This impl requires the [`"rc"`] Cargo feature of Serde. /// @@ -1620,13 +1618,11 @@ forwarded_impl! { (T), Arc, Arc::new } -#[cfg( - all( - not(de_rc_dst), - feature = "rc", - any(feature = "std", feature = "alloc") - ) -)] +#[cfg(all( + not(de_rc_dst), + feature = "rc", + any(feature = "std", feature = "alloc") +))] forwarded_impl! { /// This impl requires the [`"rc"`] Cargo feature of Serde. /// @@ -1693,13 +1689,11 @@ where //////////////////////////////////////////////////////////////////////////////// -#[cfg( - all( - de_rc_dst, - feature = "rc", - any(feature = "std", feature = "alloc") - ) -)] +#[cfg(all( + de_rc_dst, + feature = "rc", + any(feature = "std", feature = "alloc") +))] macro_rules! box_forwarded_impl { ( $(#[doc = $doc:tt])* @@ -1720,13 +1714,11 @@ macro_rules! box_forwarded_impl { }; } -#[cfg( - all( - de_rc_dst, - feature = "rc", - any(feature = "std", feature = "alloc") - ) -)] +#[cfg(all( + de_rc_dst, + feature = "rc", + any(feature = "std", feature = "alloc") +))] box_forwarded_impl! { /// This impl requires the [`"rc"`] Cargo feature of Serde. /// @@ -1738,13 +1730,11 @@ box_forwarded_impl! { Rc } -#[cfg( - all( - de_rc_dst, - feature = "rc", - any(feature = "std", feature = "alloc") - ) -)] +#[cfg(all( + de_rc_dst, + feature = "rc", + any(feature = "std", feature = "alloc") +))] box_forwarded_impl! { /// This impl requires the [`"rc"`] Cargo feature of Serde. /// diff --git a/test_suite/tests/test_gen.rs b/test_suite/tests/test_gen.rs index 8d27e651..fac27a54 100644 --- a/test_suite/tests/test_gen.rs +++ b/test_suite/tests/test_gen.rs @@ -198,12 +198,10 @@ fn test_gen() { assert::>(); #[derive(Serialize, Deserialize)] - #[serde( - bound( - serialize = "D: SerializeWith", - deserialize = "D: DeserializeWith" - ) - )] + #[serde(bound( + serialize = "D: SerializeWith", + deserialize = "D: DeserializeWith" + ))] struct WithTraits2 { #[serde( serialize_with = "SerializeWith::serialize_with", @@ -240,12 +238,10 @@ fn test_gen() { assert::>(); #[derive(Serialize, Deserialize)] - #[serde( - bound( - serialize = "D: SerializeWith", - deserialize = "D: DeserializeWith" - ) - )] + #[serde(bound( + serialize = "D: SerializeWith", + deserialize = "D: DeserializeWith" + ))] enum VariantWithTraits2 { #[serde( serialize_with = "SerializeWith::serialize_with",