Macro laby::iter_lines

source ·
macro_rules! iter_lines {
    ($expr:expr) => { ... };
}
Expand description

Convenience macro for iter! with the newline delimiter.

This macro is equivalent to the iter! macro with the newline "\n" delimiter.

Expansion

// iter_lines!($expr)
{
    iter!("\n", $expr)
}

Example

let s = iter_lines!(
    (1..=2).into_iter().map(|i: u32| span!(i))
);

assert_eq!(render!(s), "<span>1</span>\n<span>2</span>");