Standardize on 80 characters per line

Per Mozilla coding style:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
This commit is contained in:
David Tolnay
2017-04-13 13:24:44 -07:00
parent 4f6518dad7
commit eab771cd1a
6 changed files with 70 additions and 70 deletions
+24 -24
View File
@@ -8,7 +8,7 @@ use de::MapVisitor;
use de::from_primitive::FromPrimitive; use de::from_primitive::FromPrimitive;
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct UnitVisitor; struct UnitVisitor;
@@ -36,7 +36,7 @@ impl<'de> Deserialize<'de> for () {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct BoolVisitor; struct BoolVisitor;
@@ -64,7 +64,7 @@ impl<'de> Deserialize<'de> for bool {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! visit_integer_method { macro_rules! visit_integer_method {
($src_ty:ident, $method:ident, $from_method:ident, $group:ident, $group_ty:ident) => { ($src_ty:ident, $method:ident, $from_method:ident, $group:ident, $group_ty:ident) => {
@@ -146,7 +146,7 @@ impl_deserialize_num!(u64, deserialize_u64, integer);
impl_deserialize_num!(f32, deserialize_f32, integer, float); impl_deserialize_num!(f32, deserialize_f32, integer, float);
impl_deserialize_num!(f64, deserialize_f64, integer, float); impl_deserialize_num!(f64, deserialize_f64, integer, float);
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct CharVisitor; struct CharVisitor;
@@ -188,7 +188,7 @@ impl<'de> Deserialize<'de> for char {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(any(feature = "std", feature = "collections"))] #[cfg(any(feature = "std", feature = "collections"))]
struct StringVisitor; struct StringVisitor;
@@ -246,7 +246,7 @@ impl<'de> Deserialize<'de> for String {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct StrVisitor; struct StrVisitor;
@@ -281,7 +281,7 @@ impl<'de: 'a, 'a> Deserialize<'de> for &'a str {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct BytesVisitor; struct BytesVisitor;
@@ -316,7 +316,7 @@ impl<'de: 'a, 'a> Deserialize<'de> for &'a [u8] {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
struct CStringVisitor; struct CStringVisitor;
@@ -393,7 +393,7 @@ impl<'de> Deserialize<'de> for Box<CStr> {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct OptionVisitor<T> { struct OptionVisitor<T> {
marker: PhantomData<T>, marker: PhantomData<T>,
@@ -446,7 +446,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct PhantomDataVisitor<T> { struct PhantomDataVisitor<T> {
marker: PhantomData<T>, marker: PhantomData<T>,
@@ -478,7 +478,7 @@ impl<'de, T> Deserialize<'de> for PhantomData<T> {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! seq_impl { macro_rules! seq_impl {
( (
@@ -593,7 +593,7 @@ seq_impl!(
VecDeque::with_capacity(cmp::min(visitor.size_hint().0, 4096)), VecDeque::with_capacity(cmp::min(visitor.size_hint().0, 4096)),
VecDeque::push_back); VecDeque::push_back);
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct ArrayVisitor<A> { struct ArrayVisitor<A> {
marker: PhantomData<A>, marker: PhantomData<A>,
@@ -706,7 +706,7 @@ array_impls! {
32 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab 28 ac 29 ad 30 ae 31 af) 32 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab 28 ac 29 ad 30 ae 31 af)
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! tuple_impls { macro_rules! tuple_impls {
($($len:expr => $visitor:ident => ($($n:tt $name:ident)+))+) => { ($($len:expr => $visitor:ident => ($($n:tt $name:ident)+))+) => {
@@ -775,7 +775,7 @@ tuple_impls! {
16 => TupleVisitor16 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13 14 T14 15 T15) 16 => TupleVisitor16 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13 14 T14 15 T15)
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! map_impl { macro_rules! map_impl {
( (
@@ -853,7 +853,7 @@ map_impl!(
HashMap::with_hasher(S::default()), HashMap::with_hasher(S::default()),
HashMap::with_capacity_and_hasher(cmp::min(visitor.size_hint().0, 4096), S::default())); HashMap::with_capacity_and_hasher(cmp::min(visitor.size_hint().0, 4096), S::default()));
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl<'de> Deserialize<'de> for net::IpAddr { impl<'de> Deserialize<'de> for net::IpAddr {
@@ -897,7 +897,7 @@ impl<'de> Deserialize<'de> for net::Ipv6Addr {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl<'de> Deserialize<'de> for net::SocketAddr { impl<'de> Deserialize<'de> for net::SocketAddr {
@@ -941,7 +941,7 @@ impl<'de> Deserialize<'de> for net::SocketAddrV6 {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
struct PathBufVisitor; struct PathBufVisitor;
@@ -980,7 +980,7 @@ impl<'de> Deserialize<'de> for path::PathBuf {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(all(feature = "std", any(unix, windows)))] #[cfg(all(feature = "std", any(unix, windows)))]
enum OsStringKind { enum OsStringKind {
@@ -1101,7 +1101,7 @@ impl<'de> Deserialize<'de> for OsString {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(any(feature = "std", feature = "alloc"))] #[cfg(any(feature = "std", feature = "alloc"))]
impl<'de, T> Deserialize<'de> for Box<T> impl<'de, T> Deserialize<'de> for Box<T>
@@ -1186,7 +1186,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// This is a cleaned-up version of the impl generated by: // This is a cleaned-up version of the impl generated by:
// //
@@ -1318,7 +1318,7 @@ impl<'de> Deserialize<'de> for Duration {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Similar to: // Similar to:
// //
@@ -1458,10 +1458,10 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "unstable")] #[cfg(feature = "unstable")]
#[allow(deprecated)] // num::Zero is deprecated but there is no replacement #[allow(deprecated)] // num::Zero is deprecated but there is no replacement
@@ -1481,7 +1481,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl<'de, T, E> Deserialize<'de> for Result<T, E> impl<'de, T, E> Deserialize<'de> for Result<T, E>
+10 -10
View File
@@ -96,7 +96,7 @@
use lib::*; use lib::*;
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
pub mod value; pub mod value;
@@ -107,7 +107,7 @@ mod utf8;
pub use self::ignored_any::IgnoredAny; pub use self::ignored_any::IgnoredAny;
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! declare_error_trait { macro_rules! declare_error_trait {
(Error: Sized $(+ $($supertrait:ident)::+)*) => { (Error: Sized $(+ $($supertrait:ident)::+)*) => {
@@ -443,7 +443,7 @@ impl<'a> Display for Expected + 'a {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A **data structure** that can be deserialized from any data format supported /// A **data structure** that can be deserialized from any data format supported
/// by Serde. /// by Serde.
@@ -678,7 +678,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A **data format** that can deserialize any data structure supported by /// A **data format** that can deserialize any data structure supported by
/// Serde. /// Serde.
@@ -991,7 +991,7 @@ pub trait Deserializer<'de>: Sized {
V: Visitor<'de>; V: Visitor<'de>;
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// This trait represents a visitor that walks through a deserializer. /// This trait represents a visitor that walks through a deserializer.
/// ///
@@ -1323,7 +1323,7 @@ pub trait Visitor<'de>: Sized {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// `SeqVisitor` visits each item in a sequence. /// `SeqVisitor` visits each item in a sequence.
/// ///
@@ -1391,7 +1391,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// `MapVisitor` visits each item in a sequence. /// `MapVisitor` visits each item in a sequence.
/// ///
@@ -1557,7 +1557,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// `EnumVisitor` is a visitor that is created by the `Deserializer` and passed /// `EnumVisitor` is a visitor that is created by the `Deserializer` and passed
/// to the `Deserialize` in order to identify which variant of an enum to /// to the `Deserialize` in order to identify which variant of an enum to
@@ -1776,7 +1776,7 @@ pub trait VariantVisitor<'de>: Sized {
V: Visitor<'de>; V: Visitor<'de>;
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// This trait converts primitive types into a deserializer. /// This trait converts primitive types into a deserializer.
pub trait IntoDeserializer<'de, E: Error = value::Error> { pub trait IntoDeserializer<'de, E: Error = value::Error> {
@@ -1787,7 +1787,7 @@ pub trait IntoDeserializer<'de, E: Error = value::Error> {
fn into_deserializer(self) -> Self::Deserializer; fn into_deserializer(self) -> Self::Deserializer;
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Used in error messages. /// Used in error messages.
/// ///
+13 -13
View File
@@ -4,7 +4,7 @@ use lib::*;
use de::{self, IntoDeserializer, Expected, SeqVisitor}; use de::{self, IntoDeserializer, Expected, SeqVisitor};
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// This represents all the possible errors that can occur using the `ValueDeserializer`. /// This represents all the possible errors that can occur using the `ValueDeserializer`.
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
@@ -54,7 +54,7 @@ impl error::Error for Error {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl<'de, E> IntoDeserializer<'de, E> for () impl<'de, E> IntoDeserializer<'de, E> for ()
where where
@@ -100,7 +100,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! primitive_deserializer { macro_rules! primitive_deserializer {
($ty:ty, $name:ident, $method:ident $($cast:tt)*) => { ($ty:ty, $name:ident, $method:ident $($cast:tt)*) => {
@@ -226,7 +226,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a `&str`. /// A helper deserializer that deserializes a `&str`.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
@@ -296,7 +296,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a `String`. /// A helper deserializer that deserializes a `String`.
#[cfg(any(feature = "std", feature = "collections"))] #[cfg(any(feature = "std", feature = "collections"))]
@@ -370,7 +370,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a `String`. /// A helper deserializer that deserializes a `String`.
#[cfg(any(feature = "std", feature = "collections"))] #[cfg(any(feature = "std", feature = "collections"))]
@@ -447,7 +447,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a sequence. /// A helper deserializer that deserializes a sequence.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
@@ -550,7 +550,7 @@ impl Expected for ExpectedInSeq {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(any(feature = "std", feature = "collections"))] #[cfg(any(feature = "std", feature = "collections"))]
impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T> impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
@@ -591,7 +591,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a sequence using a `SeqVisitor`. /// A helper deserializer that deserializes a sequence using a `SeqVisitor`.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
@@ -626,7 +626,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a map. /// A helper deserializer that deserializes a map.
pub struct MapDeserializer<'de, I, E> pub struct MapDeserializer<'de, I, E>
@@ -958,7 +958,7 @@ impl Expected for ExpectedInMap {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(any(feature = "std", feature = "collections"))] #[cfg(any(feature = "std", feature = "collections"))]
impl<'de, K, V, E> IntoDeserializer<'de, E> for BTreeMap<K, V> impl<'de, K, V, E> IntoDeserializer<'de, E> for BTreeMap<K, V>
@@ -988,7 +988,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A helper deserializer that deserializes a map using a `MapVisitor`. /// A helper deserializer that deserializes a map using a `MapVisitor`.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
@@ -1023,7 +1023,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
mod private { mod private {
use lib::*; use lib::*;
+3 -3
View File
@@ -68,7 +68,7 @@
//! [Cargo]: http://doc.crates.io/manifest.html //! [Cargo]: http://doc.crates.io/manifest.html
//! [redis-rs]: https://crates.io/crates/redis //! [redis-rs]: https://crates.io/crates/redis
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Serde types in rustdoc of other crates get linked to here. // Serde types in rustdoc of other crates get linked to here.
#![doc(html_root_url = "https://docs.rs/serde/0.9.13")] #![doc(html_root_url = "https://docs.rs/serde/0.9.13")]
@@ -91,7 +91,7 @@
// Blacklisted Rust lints. // Blacklisted Rust lints.
#![deny(missing_docs, unused_imports)] #![deny(missing_docs, unused_imports)]
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "collections")] #[cfg(feature = "collections")]
extern crate collections; extern crate collections;
@@ -182,7 +182,7 @@ mod lib {
pub use core::num::Zero; pub use core::num::Zero;
} }
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[macro_use] #[macro_use]
mod macros; mod macros;
+17 -17
View File
@@ -5,7 +5,7 @@ use ser::{Serialize, SerializeSeq, SerializeTuple, Serializer};
#[cfg(feature = "std")] #[cfg(feature = "std")]
use ser::Error; use ser::Error;
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! impl_visit { macro_rules! impl_visit {
($ty:ty, $method:ident $($cast:tt)*) => { ($ty:ty, $method:ident $($cast:tt)*) => {
@@ -35,7 +35,7 @@ impl_visit!(f32, serialize_f32);
impl_visit!(f64, serialize_f64); impl_visit!(f64, serialize_f64);
impl_visit!(char, serialize_char); impl_visit!(char, serialize_char);
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl Serialize for str { impl Serialize for str {
#[inline] #[inline]
@@ -58,7 +58,7 @@ impl Serialize for String {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl Serialize for CStr { impl Serialize for CStr {
@@ -82,7 +82,7 @@ impl Serialize for CString {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl<T> Serialize for Option<T> impl<T> Serialize for Option<T>
where where
@@ -100,7 +100,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl<T> Serialize for PhantomData<T> { impl<T> Serialize for PhantomData<T> {
#[inline] #[inline]
@@ -112,7 +112,7 @@ impl<T> Serialize for PhantomData<T> {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Does not require T: Serialize. // Does not require T: Serialize.
impl<T> Serialize for [T; 0] { impl<T> Serialize for [T; 0] {
@@ -175,7 +175,7 @@ array_impls!(30);
array_impls!(31); array_impls!(31);
array_impls!(32); array_impls!(32);
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! serialize_seq { macro_rules! serialize_seq {
() => { () => {
@@ -244,7 +244,7 @@ where
serialize_seq!(); serialize_seq!();
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl<Idx> Serialize for ops::Range<Idx> impl<Idx> Serialize for ops::Range<Idx>
@@ -263,7 +263,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl Serialize for () { impl Serialize for () {
#[inline] #[inline]
@@ -275,7 +275,7 @@ impl Serialize for () {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! tuple_impls { macro_rules! tuple_impls {
($( ($(
@@ -473,7 +473,7 @@ tuple_impls! {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! serialize_map { macro_rules! serialize_map {
() => { () => {
@@ -505,7 +505,7 @@ where
serialize_map!(); serialize_map!();
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl<'a, T: ?Sized> Serialize for &'a T impl<'a, T: ?Sized> Serialize for &'a T
where where
@@ -589,7 +589,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
impl<T, E> Serialize for Result<T, E> impl<T, E> Serialize for Result<T, E>
where where
@@ -609,7 +609,7 @@ where
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl Serialize for Duration { impl Serialize for Duration {
@@ -625,7 +625,7 @@ impl Serialize for Duration {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Seralize the `$value` that implements Display as a string, /// Seralize the `$value` that implements Display as a string,
/// when that string is statically known to never have more than /// when that string is statically known to never have more than
@@ -694,7 +694,7 @@ impl Serialize for net::Ipv6Addr {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl Serialize for net::SocketAddr { impl Serialize for net::SocketAddr {
@@ -733,7 +733,7 @@ impl Serialize for net::SocketAddrV6 {
} }
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")] #[cfg(feature = "std")]
impl Serialize for path::Path { impl Serialize for path::Path {
+3 -3
View File
@@ -108,7 +108,7 @@ mod impossible;
pub use self::impossible::Impossible; pub use self::impossible::Impossible;
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
macro_rules! declare_error_trait { macro_rules! declare_error_trait {
(Error: Sized $(+ $($supertrait:ident)::+)*) => { (Error: Sized $(+ $($supertrait:ident)::+)*) => {
@@ -166,7 +166,7 @@ declare_error_trait!(Error: Sized + error::Error);
#[cfg(not(feature = "std"))] #[cfg(not(feature = "std"))]
declare_error_trait!(Error: Sized + Debug + Display); declare_error_trait!(Error: Sized + Debug + Display);
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A **data structure** that can be serialized into any data format supported /// A **data structure** that can be serialized into any data format supported
/// by Serde. /// by Serde.
@@ -204,7 +204,7 @@ pub trait Serialize {
S: Serializer; S: Serializer;
} }
/////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// A **data format** that can serialize any data structure supported by Serde. /// A **data format** that can serialize any data structure supported by Serde.
/// ///