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
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 33 additions and 47 deletions

View File

@ -1602,13 +1602,11 @@ forwarded_impl!((T), Box<[T]>, Vec::into_boxed_slice);
#[cfg(any(feature = "std", feature = "alloc"))]
forwarded_impl!((), Box<str>, 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<T>, 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.
///

View File

@ -198,12 +198,10 @@ 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",
@ -240,12 +238,10 @@ 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",