@@ -31,10 +31,10 @@ use alloc::vec::Vec;
3131#[ cfg( feature = "std" ) ]
3232use std:: io:: { self , BufRead , IoSlice , IoSliceMut , Read , ReadBuf , Write } ;
3333
34- #[ cfg( feature = "serde_support " ) ]
34+ #[ cfg( feature = "serde " ) ]
3535use core:: marker:: PhantomData ;
3636
37- #[ cfg( feature = "serde_support " ) ]
37+ #[ cfg( feature = "serde " ) ]
3838use serde:: {
3939 de:: { SeqAccess , Visitor } ,
4040 Deserialize , Deserializer , Serialize , Serializer ,
@@ -456,8 +456,8 @@ impl<const N: usize> From<StaticString<N>> for StaticVec<u8, N> {
456456 }
457457}
458458
459- /// **Note:** this is only available when the `std` crate feature is enabled.
460459#[ cfg( feature = "std" ) ]
460+ #[ doc( cfg( feature = "std" ) ) ]
461461impl < T , const N : usize > From < Vec < T > > for StaticVec < T , N > {
462462 /// Functionally equivalent to [`from_vec`](crate::StaticVec::from_vec).
463463 #[ inline( always) ]
@@ -693,9 +693,9 @@ impl<T, const N: usize> const IndexMut<RangeToInclusive<usize>> for StaticVec<T,
693693 }
694694}
695695
696- /// **Note:** this is only available when the `std` crate feature is enabled.
697696#[ allow( clippy:: from_over_into) ]
698697#[ cfg( feature = "std" ) ]
698+ #[ doc( cfg( feature = "std" ) ) ]
699699impl < T , const N : usize > Into < Vec < T > > for StaticVec < T , N > {
700700 /// Functionally equivalent to [`into_vec`](crate::StaticVec::into_vec).
701701 #[ inline( always) ]
@@ -794,9 +794,8 @@ impl_partial_ord_with_as_slice_against_slice!(&mut [T1], StaticVec<T2, N>);
794794
795795/// Read from a StaticVec. This implementation operates by copying bytes into the destination
796796/// buffers, then shifting the remaining bytes over.
797- ///
798- /// **Note:** this is only available when the `std` crate feature is enabled.
799797#[ cfg( feature = "std" ) ]
798+ #[ doc( cfg( feature = "std" ) ) ]
800799impl < const N : usize > Read for StaticVec < u8 , N > {
801800 #[ inline]
802801 fn read ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
@@ -901,8 +900,8 @@ impl<const N: usize> Read for StaticVec<u8, N> {
901900 }
902901}
903902
904- /// **Note:** this is only available when the `std` crate feature is enabled.
905903#[ cfg( feature = "std" ) ]
904+ #[ doc( cfg( feature = "std" ) ) ]
906905impl < const N : usize > Write for StaticVec < u8 , N > {
907906 #[ inline]
908907 fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
@@ -942,8 +941,8 @@ impl<const N: usize> Write for StaticVec<u8, N> {
942941 }
943942}
944943
945- /// **Note:** this is only available when the `std` crate feature is enabled.
946944#[ cfg( feature = "std" ) ]
945+ #[ doc( cfg( feature = "std" ) ) ]
947946impl < const N : usize > BufRead for StaticVec < u8 , N > {
948947 #[ inline( always) ]
949948 fn fill_buf ( & mut self ) -> io:: Result < & [ u8 ] > {
@@ -956,7 +955,8 @@ impl<const N: usize> BufRead for StaticVec<u8, N> {
956955 }
957956}
958957
959- #[ cfg( feature = "serde_support" ) ]
958+ #[ cfg( feature = "serde" ) ]
959+ #[ doc( cfg( feature = "serde" ) ) ]
960960impl < ' de , T , const N : usize > Deserialize < ' de > for StaticVec < T , N >
961961where T : Deserialize < ' de >
962962{
@@ -993,7 +993,8 @@ where T: Deserialize<'de>
993993 }
994994}
995995
996- #[ cfg( feature = "serde_support" ) ]
996+ #[ cfg( feature = "serde" ) ]
997+ #[ doc( cfg( feature = "serde" ) ) ]
997998impl < T , const N : usize > Serialize for StaticVec < T , N >
998999where T : Serialize
9991000{
0 commit comments