[][src]Macro compact_arena::in_nano_arena

macro_rules! in_nano_arena {
    ($arena:ident, $e:expr) => { ... };
}

Run code using a nano arena. The indirection through the macro is required to bind the indices to the arena.

Examples

in_nano_arena!(arena, {
    let idx = arena.add(1usize);
    assert_eq!(1, arena[idx]);
});