From 27ccd3ffa088b0650b526cc3a0045c55d56c551d Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Fri, 4 Mar 2022 17:18:10 -0500 Subject: [PATCH] fix(der): manually impl Default for SetOfVec Signed-off-by: Nathaniel McCallum --- der/src/asn1/set_of.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/der/src/asn1/set_of.rs b/der/src/asn1/set_of.rs index b9314ad77..93a07dd03 100644 --- a/der/src/asn1/set_of.rs +++ b/der/src/asn1/set_of.rs @@ -177,7 +177,7 @@ impl<'a, T> ExactSizeIterator for SetOfIter<'a, T> {} /// and depends on `alloc` support. #[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] -#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] pub struct SetOfVec where T: DerOrd, @@ -185,6 +185,16 @@ where inner: Vec, } +#[cfg(feature = "alloc")] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +impl Default for SetOfVec { + fn default() -> Self { + Self { + inner: Default::default(), + } + } +} + #[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] impl SetOfVec