extern crate indented; use indented::indented; fn main() { let x = "statement"; let y = format!("nested {{\n{};\n}}", indented(&x)); println!("block {{\n{};\n{}\n}}", indented(&x), indented(&y)); }