@@ -1440,6 +1440,7 @@ impl<A: Array> From<A> for ArrayVec<A> {
14401440/// The error type returned when a conversion from a slice to an [`ArrayVec`]
14411441/// fails.
14421442#[ derive( Debug , Copy , Clone ) ]
1443+ #[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
14431444pub struct TryFromSliceError ( ( ) ) ;
14441445
14451446impl core:: fmt:: Display for TryFromSliceError {
@@ -1594,6 +1595,17 @@ where
15941595 }
15951596}
15961597
1598+ #[ cfg( feature = "defmt" ) ]
1599+ #[ cfg_attr( docs_rs, doc( cfg( feature = "defmt" ) ) ) ]
1600+ impl < A : Array > defmt:: Format for ArrayVecIterator < A >
1601+ where
1602+ A :: Item : defmt:: Format ,
1603+ {
1604+ fn format ( & self , fmt : defmt:: Formatter < ' _ > ) {
1605+ defmt:: write!( fmt, "ArrayVecIterator({:?})" , self . as_slice( ) )
1606+ }
1607+ }
1608+
15971609impl < A : Array > IntoIterator for ArrayVec < A > {
15981610 type Item = A :: Item ;
15991611 type IntoIter = ArrayVecIterator < A > ;
@@ -1734,6 +1746,17 @@ where
17341746 }
17351747}
17361748
1749+ #[ cfg( feature = "defmt" ) ]
1750+ #[ cfg_attr( docs_rs, doc( cfg( feature = "defmt" ) ) ) ]
1751+ impl < A : Array > defmt:: Format for ArrayVec < A >
1752+ where
1753+ A :: Item : defmt:: Format ,
1754+ {
1755+ fn format ( & self , fmt : defmt:: Formatter < ' _ > ) {
1756+ defmt:: Format :: format ( self . as_slice ( ) , fmt)
1757+ }
1758+ }
1759+
17371760impl < A : Array > Display for ArrayVec < A >
17381761where
17391762 A :: Item : Display ,
0 commit comments