slicedisplay - lightweight Display for Vecs and slices

slicedisplay is a tiny no-std crate which supplies the SliceDisplay trait.

This trait extends &[T] and Vec<T> with the display method, which allows formatting without heap allocations.

Usage

```rust use slicedisplay::SliceDisplay;

let empty: Vec = Vec::new(); asserteq!(empty.display().tostring(), "[]");

let single = Vec::from([1]); asserteq!(single.display().tostring(), "[1]");

let numbers = Vec::from([1, 2, 3, 4, 5]); asserteq!(numbers.display().tostring(), "[1, 2, 3, 4, 5]"); ```

It's also possible to slightly customize the display.

```rust use slicedisplay::SliceDisplay;

let hello: Vec<_> = "Hello".chars().collect(); asserteq!( hello.display().delimiter(';').tostring(), "[H; e; l; l; o]" ); asserteq!( hello.display().terminator('{', '}').tostring(), "{H, e, l, l, o}" ); asserteq!( hello .display() .terminator('(', ')') .delimiter(';') .tostring(), "(H; e; l; l; o)" ); ```