diff --git a/src/vec1.rs b/src/vec1.rs index b970fd0..2d203c2 100644 --- a/src/vec1.rs +++ b/src/vec1.rs @@ -9,7 +9,7 @@ use serde::{Serialize, Deserialize}; /// `Vec1` represents a non-empty `Vec`. It derefs to `Vec` /// directly. -#[derive(Clone, PartialEq, Serialize, Deserialize, Default)] +#[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct Vec1(Vec) where T: Debug; @@ -40,6 +40,11 @@ where Ok(Self(items)) } } + + /// Converts this Vec1 into Vec + pub fn into_vec(self) -> Vec { + self.0 + } } impl fmt::Debug for Vec1