extern crate indented; use indented::indented; fn main() { let statements = vec![ "println!(\"hello world\")", "let x = 2 + 3;", "println!(\"x = {}\", x);", ]; println!("block {{"); for statement in &statements { println!("{}", indented(statement)); } println!("}}"); }