Format with rustfmt-nightly 0.3.4

This commit is contained in:
David Tolnay
2017-12-23 20:13:08 -08:00
parent c2b390fe63
commit ee75e6c0e9
32 changed files with 2035 additions and 1894 deletions
+9 -6
View File
@@ -73,11 +73,17 @@ pub struct Compact<T: ?Sized>(T);
/// ```
pub trait Configure {
/// Marks `self` as using `is_human_readable == true`
fn readable(self) -> Readable<Self> where Self: Sized {
fn readable(self) -> Readable<Self>
where
Self: Sized,
{
Readable(self)
}
/// Marks `self` as using `is_human_readable == false`
fn compact(self) -> Compact<Self> where Self: Sized {
fn compact(self) -> Compact<Self>
where
Self: Sized,
{
Compact(self)
}
}
@@ -158,7 +164,6 @@ where
}
}
macro_rules! forward_method {
($name: ident (self $(, $arg: ident : $arg_type: ty)* ) -> $return_type: ty) => {
fn $name (self $(, $arg : $arg_type)* ) -> $return_type {
@@ -455,8 +460,7 @@ macro_rules! impl_serializer {
impl_serializer!(Readable, true);
impl_serializer!(Compact, false);
use serde::de::{Visitor, EnumAccess, VariantAccess, MapAccess, DeserializeSeed, SeqAccess, Error};
use serde::de::{DeserializeSeed, EnumAccess, Error, MapAccess, SeqAccess, VariantAccess, Visitor};
macro_rules! forward_deserialize_methods {
( $wrapper : ident ( $( $name: ident ),* ) ) => {
@@ -468,7 +472,6 @@ macro_rules! forward_deserialize_methods {
};
}
macro_rules! impl_deserializer {
($wrapper : ident, $is_human_readable : expr) => {
impl <'de, D> Deserializer<'de> for $wrapper<D> where D: Deserializer<'de> {