pub fn collapse<T, let N: u32>(input: [Option<T>; N]) -> BoundedVec<T, N> where T: Eq
Collapses an array of Options with sparse Some values into a BoundedVec, essentially unwrapping the Options and removing the None values.
Option
Some
BoundedVec
None
For example, given: input: [some(3), none(), some(1)] this returns collapsed: [3, 1]
input: [some(3), none(), some(1)]
collapsed: [3, 1]
Collapses an array of
Options with sparseSomevalues into aBoundedVec, essentially unwrapping theOptions and removing theNonevalues.For example, given:
input: [some(3), none(), some(1)]this returnscollapsed: [3, 1]