Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: add conversion for BoundedVec to Vec
Fintan Halpenny committed 2 years ago
commit 92f21d7f299c71a8cd7848cbec92df34fb92fe56
parent 559f84d9f1739ac7d7a98a1e7431d431639648b7
1 file changed +6 -0
modified radicle-node/src/bounded.rs
@@ -189,6 +189,12 @@ impl<T, const N: usize> TryFrom<Vec<T>> for BoundedVec<T, N> {
    }
}

+
impl<T, const N: usize> From<BoundedVec<T, N>> for Vec<T> {
+
    fn from(value: BoundedVec<T, N>) -> Self {
+
        value.v
+
    }
+
}
+

impl<T: std::fmt::Debug, const N: usize> std::fmt::Debug for BoundedVec<T, N> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        self.v.fmt(f)