Macro bumpalo::format

source ·
macro_rules! format {
    ( in $bump:expr, $fmt:expr, $($args:expr),* ) => { ... };
    ( in $bump:expr, $fmt:expr, $($args:expr,)* ) => { ... };
}
Expand description

Like the format! macro, but for creating bumpalo::collections::Strings.

Examples

use bumpalo::Bump;

let b = Bump::new();

let who = "World";
let s = bumpalo::format!(in &b, "Hello, {}!", who);
assert_eq!(s, "Hello, World!")