Isn’t there a more compact way of creating fixed-size (potentially stack-allocated) strings than this:
use std::str; let x: &[u8] = &[b'a', b'b']; let stack_str: &str = str::from_utf8(x).unwrap();
Isn’t a macro motivated here? That macro should check that the characters fed as literals are all correct unicode letters and statically infer the strings size from UTF-8 encoding of those letters.
A crate for this, anyone?
BTW: Why isn’t the block of code above syntax highlighted?