File: usage.rs

package info (click to toggle)
rust-indenter 0.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 116 kB
  • sloc: makefile: 4
file content (12 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (15)
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);
}