From 661cdf4e0081b93b88a2fbef99d9d9a71765babc Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 1 Feb 2017 12:58:01 -0800 Subject: [PATCH] Inline the trait docs at the top level --- serde/src/de/mod.rs | 8 ++++---- serde/src/lib.rs | 2 ++ serde/src/ser/mod.rs | 7 +++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index bdc0403b..ce86ce1e 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -488,8 +488,8 @@ impl<'a> Display for Expected + 'a { /////////////////////////////////////////////////////////////////////////////// -/// An implementation of this trait is a **data structure** that can be -/// deserialized from any data format supported by Serde. +/// A **data structure** that can be deserialized from any data format supported +/// by Serde. /// /// Serde provides `Deserialize` implementations for many Rust primitive and /// standard library types. The complete list is [here][de]. All of these can @@ -687,8 +687,8 @@ impl DeserializeSeed for PhantomData /////////////////////////////////////////////////////////////////////////////// -/// An implementation of this trait is a **data format** that can deserialize -/// any data structure supported by Serde. +/// A **data format** that can deserialize any data structure supported by +/// Serde. /// /// The role of this trait is to define the deserialization half of the Serde /// data model, which is a way to categorize every Rust data type into one of 28 diff --git a/serde/src/lib.rs b/serde/src/lib.rs index eb07bbbf..62424061 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -84,7 +84,9 @@ mod core { pub use actual_core::nonzero; } +#[doc(inline)] pub use ser::{Serialize, Serializer}; +#[doc(inline)] pub use de::{Deserialize, Deserializer}; #[macro_use] diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index 8bdb437a..a18346ce 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -141,8 +141,8 @@ pub trait Error: Sized + error::Error { /////////////////////////////////////////////////////////////////////////////// -/// An implementation of this trait is a **data structure** that can be -/// serialized into any data format supported by Serde. +/// A **data structure** that can be serialized into any data format supported +/// by Serde. /// /// Serde provides `Serialize` implementations for many Rust primitive and /// standard library types. The complete list is [here][ser]. All of these can @@ -178,8 +178,7 @@ pub trait Serialize { /////////////////////////////////////////////////////////////////////////////// -/// An implementation of this trait is a **data format** that can serialize any -/// data structure supported by Serde. +/// A **data format** that can serialize any data structure supported by Serde. /// /// The role of this trait is to define the serialization half of the Serde data /// model, which is a way to categorize every Rust data structure into one of 28