diff --git a/Cargo.toml b/Cargo.toml index 256bff8..f0a4691 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ debug = true debug = true [package.metadata.docs.rs] -features = ["borsh", "serde", "zeroize"] +all-features = true [package.metadata.release] no-dev-version = true diff --git a/src/array_string.rs b/src/array_string.rs index 1144360..5218a54 100644 --- a/src/array_string.rs +++ b/src/array_string.rs @@ -580,7 +580,6 @@ impl FromStr for ArrayString } #[cfg(feature="serde")] -/// Requires crate feature `"serde"` impl Serialize for ArrayString { fn serialize(&self, serializer: S) -> Result @@ -591,7 +590,6 @@ impl Serialize for ArrayString } #[cfg(feature="serde")] -/// Requires crate feature `"serde"` impl<'de, const CAP: usize> Deserialize<'de> for ArrayString { fn deserialize(deserializer: D) -> Result @@ -629,7 +627,6 @@ impl<'de, const CAP: usize> Deserialize<'de> for ArrayString } #[cfg(feature = "borsh")] -/// Requires crate feature `"borsh"` impl borsh::BorshSerialize for ArrayString { fn serialize(&self, writer: &mut W) -> borsh::io::Result<()> { ::serialize(&*self, writer) @@ -637,7 +634,6 @@ impl borsh::BorshSerialize for ArrayString { } #[cfg(feature = "borsh")] -/// Requires crate feature `"borsh"` impl borsh::BorshDeserialize for ArrayString { fn deserialize_reader(reader: &mut R) -> borsh::io::Result { let len = ::deserialize_reader(reader)? as usize; @@ -683,7 +679,7 @@ impl<'a, const CAP: usize> TryFrom> for ArrayString } #[cfg(feature = "zeroize")] -/// "Best efforts" zeroing of the `ArrayString`'s buffer when the `zeroize` feature is enabled. +/// "Best efforts" zeroing of the `ArrayString`'s buffer. /// /// The length is set to 0, and the buffer is dropped and zeroized. /// Cannot ensure that previous moves of the `ArrayString` did not leave values on the stack. diff --git a/src/arrayvec.rs b/src/arrayvec.rs index e87b3ef..f52d50c 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -850,7 +850,7 @@ impl IntoIterator for ArrayVec { #[cfg(feature = "zeroize")] -/// "Best efforts" zeroing of the `ArrayVec`'s buffer when the `zeroize` feature is enabled. +/// "Best efforts" zeroing of the `ArrayVec`'s buffer. /// /// The length is set to 0, and the buffer is dropped and zeroized. /// Cannot ensure that previous moves of the `ArrayVec` did not leave values on the stack. @@ -1254,8 +1254,6 @@ impl Ord for ArrayVec where T: Ord { #[cfg(feature="std")] /// `Write` appends written data to the end of the vector. -/// -/// Requires `features="std"`. impl io::Write for ArrayVec { fn write(&mut self, data: &[u8]) -> io::Result { let len = cmp::min(self.remaining_capacity(), data.len()); @@ -1267,7 +1265,6 @@ impl io::Write for ArrayVec { } #[cfg(feature="serde")] -/// Requires crate feature `"serde"` impl Serialize for ArrayVec { fn serialize(&self, serializer: S) -> Result where S: Serializer @@ -1277,7 +1274,6 @@ impl Serialize for ArrayVec { } #[cfg(feature="serde")] -/// Requires crate feature `"serde"` impl<'de, T: Deserialize<'de>, const CAP: usize> Deserialize<'de> for ArrayVec { fn deserialize(deserializer: D) -> Result where D: Deserializer<'de> @@ -1314,7 +1310,6 @@ impl<'de, T: Deserialize<'de>, const CAP: usize> Deserialize<'de> for ArrayVec borsh::BorshSerialize for ArrayVec where T: borsh::BorshSerialize, @@ -1325,7 +1320,6 @@ where } #[cfg(feature = "borsh")] -/// Requires crate feature `"borsh"` impl borsh::BorshDeserialize for ArrayVec where T: borsh::BorshDeserialize, diff --git a/src/errors.rs b/src/errors.rs index 7ca3ebc..8e18ae8 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -32,7 +32,6 @@ impl CapacityError { const CAPERROR: &'static str = "insufficient capacity"; #[cfg(feature="std")] -/// Requires `features="std"`. impl Error for CapacityError {} impl fmt::Display for CapacityError { diff --git a/src/lib.rs b/src/lib.rs index f9a2fe6..d5a6685 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,6 +21,9 @@ //! #![doc(html_root_url="https://docs.rs/arrayvec/0.7/")] #![cfg_attr(not(feature="std"), no_std)] +// This enables the nightly feature `doc_auto_cfg` when running on docs.rs, +// which always uses the nightly compiler. +#![cfg_attr(docsrs, feature(doc_auto_cfg))] #[cfg(feature="serde")] extern crate serde;