Format with rustfmt 0.99.2

This commit is contained in:
David Tolnay
2018-08-14 19:59:20 -07:00
parent d28a0e66c8
commit 5985b7edaf
2 changed files with 33 additions and 47 deletions
+25 -35
View File
@@ -1602,13 +1602,11 @@ forwarded_impl!((T), Box<[T]>, Vec::into_boxed_slice);
#[cfg(any(feature = "std", feature = "alloc"))] #[cfg(any(feature = "std", feature = "alloc"))]
forwarded_impl!((), Box<str>, String::into_boxed_str); forwarded_impl!((), Box<str>, String::into_boxed_str);
#[cfg( #[cfg(all(
all( not(de_rc_dst),
not(de_rc_dst), feature = "rc",
feature = "rc", any(feature = "std", feature = "alloc")
any(feature = "std", feature = "alloc") ))]
)
)]
forwarded_impl! { forwarded_impl! {
/// This impl requires the [`"rc"`] Cargo feature of Serde. /// This impl requires the [`"rc"`] Cargo feature of Serde.
/// ///
@@ -1620,13 +1618,11 @@ forwarded_impl! {
(T), Arc<T>, Arc::new (T), Arc<T>, Arc::new
} }
#[cfg( #[cfg(all(
all( not(de_rc_dst),
not(de_rc_dst), feature = "rc",
feature = "rc", any(feature = "std", feature = "alloc")
any(feature = "std", feature = "alloc") ))]
)
)]
forwarded_impl! { forwarded_impl! {
/// This impl requires the [`"rc"`] Cargo feature of Serde. /// This impl requires the [`"rc"`] Cargo feature of Serde.
/// ///
@@ -1693,13 +1689,11 @@ where
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg( #[cfg(all(
all( de_rc_dst,
de_rc_dst, feature = "rc",
feature = "rc", any(feature = "std", feature = "alloc")
any(feature = "std", feature = "alloc") ))]
)
)]
macro_rules! box_forwarded_impl { macro_rules! box_forwarded_impl {
( (
$(#[doc = $doc:tt])* $(#[doc = $doc:tt])*
@@ -1720,13 +1714,11 @@ macro_rules! box_forwarded_impl {
}; };
} }
#[cfg( #[cfg(all(
all( de_rc_dst,
de_rc_dst, feature = "rc",
feature = "rc", any(feature = "std", feature = "alloc")
any(feature = "std", feature = "alloc") ))]
)
)]
box_forwarded_impl! { box_forwarded_impl! {
/// This impl requires the [`"rc"`] Cargo feature of Serde. /// This impl requires the [`"rc"`] Cargo feature of Serde.
/// ///
@@ -1738,13 +1730,11 @@ box_forwarded_impl! {
Rc Rc
} }
#[cfg( #[cfg(all(
all( de_rc_dst,
de_rc_dst, feature = "rc",
feature = "rc", any(feature = "std", feature = "alloc")
any(feature = "std", feature = "alloc") ))]
)
)]
box_forwarded_impl! { box_forwarded_impl! {
/// This impl requires the [`"rc"`] Cargo feature of Serde. /// This impl requires the [`"rc"`] Cargo feature of Serde.
/// ///
+8 -12
View File
@@ -198,12 +198,10 @@ fn test_gen() {
assert::<WithTraits1<X, X>>(); assert::<WithTraits1<X, X>>();
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[serde( #[serde(bound(
bound( serialize = "D: SerializeWith",
serialize = "D: SerializeWith", deserialize = "D: DeserializeWith"
deserialize = "D: DeserializeWith" ))]
)
)]
struct WithTraits2<D, E> { struct WithTraits2<D, E> {
#[serde( #[serde(
serialize_with = "SerializeWith::serialize_with", serialize_with = "SerializeWith::serialize_with",
@@ -240,12 +238,10 @@ fn test_gen() {
assert::<VariantWithTraits1<X, X>>(); assert::<VariantWithTraits1<X, X>>();
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[serde( #[serde(bound(
bound( serialize = "D: SerializeWith",
serialize = "D: SerializeWith", deserialize = "D: DeserializeWith"
deserialize = "D: DeserializeWith" ))]
)
)]
enum VariantWithTraits2<D, E> { enum VariantWithTraits2<D, E> {
#[serde( #[serde(
serialize_with = "SerializeWith::serialize_with", serialize_with = "SerializeWith::serialize_with",