orx-imp-vec 2.17.0

`ImpVec` stands for immutable push vector 👿, it is a data structure which allows appending elements with a shared reference.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::imp_vec::ImpVec;
use core::fmt::Debug;
use orx_pinned_vec::PinnedVec;

impl<T: Debug, P: PinnedVec<T> + Debug> Debug for ImpVec<T, P> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "[")?;
        let mut iter = self.iter();
        if let Some(x) = iter.next() {
            write!(f, "{x:?}")?;
            for x in iter {
                write!(f, ", {x:?}")?;
            }
        }
        write!(f, "]")
    }
}