slicedisplay - lightweight Display for Vecs and slices
slicedisplay is a tiny no-std crate which supplies the SliceDisplay trait.
This trait extends AsRef<[T]> with the display method, which allows formatting without heap allocations.
Requires at least Rust 1.58.
Usage
use SliceDisplay;
let empty: = Vecnew;
assert_eq!;
let single = Vecfrom;
assert_eq!;
let numbers = Vecfrom;
assert_eq!;
It's also possible to slightly customize the display.
use SliceDisplay;
let hello: = "Hello".chars.collect;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;