Macro astr

Source
macro_rules! astr {
    ($val:expr) => { ... };
}
Expand description

A simple and easy way to make a perfectly fitting ArrayString from a literal.

ยงExpansion

use aformat::astr;

let my_string = astr!("Hello World");

expands to

let my_string = {
    const STR_LEN: usize = str::len("Hello World");
    aformat::ArrayString::<STR_LEN>::from("Hello World").unwrap();
};