indenter 0.3.4

A formatter wrapper that indents the text, designed for error display impls
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use indenter::indented;
use std::fmt::Write;

fn main() {
    let input = "verify\nthis";
    let mut output = String::new();

    indented(&mut output).ind(12).write_str(input).unwrap();

    println!("Before:\n{}\n", input);
    println!("After:\n{}", output);
}