In my program, I use smallvec to collect iterators into arrays. My strategy is:
let my_iterator = { /* ... */ };
let res: [Foobar; 24] = my_iterator.collect::<SmallVec<[Foobar; 24]>>().into_inner().unwrap();
In this scenario, into_inner() returns Result<[Foobar; 24], SmallVec<[Foobar; 24]>>, where Ok(...) is returned if and only if the length is equal to the array capacity.
I would like to use the tinyvec package in this program instead. Is it possible that something close to into_inner() could be implemented on the ArrayVec and TinyVec structures? I would be willing to implement this PR.
In my program, I use
smallvec
to collect iterators into arrays. My strategy is:In this scenario,
into_inner()
returnsResult<[Foobar; 24], SmallVec<[Foobar; 24]>>
, whereOk(...)
is returned if and only if the length is equal to the array capacity.I would like to use the
tinyvec
package in this program instead. Is it possible that something close tointo_inner()
could be implemented on theArrayVec
andTinyVec
structures? I would be willing to implement this PR.