pretty_balanced

Crates.iopretty_balanced
lib.rspretty_balanced
version0.1.0
sourcesrc
created_at2019-04-28 13:52:27.774396
updated_at2019-04-28 13:52:27.774396
descriptionA library for displaying code in human-readable format.
homepagehttps://github.com/segeljakt/pretty_balanced
repositoryhttps://github.com/segeljakt/pretty_balanced
max_upload_size
id130706
size4,210
Klas Segeljakt (segeljakt)

documentation

README

pretty_balanced

A library for displaying code in human-readable format.

Example

use pretty_balanced::PrettyBalanced;

fn main() {
    println!("{}", "if 3 { foo; bar } else { baz }".pretty_balanced());
}

Output:

if 3 {
     foo;
     bar
} else {
     baz
}

The formatting simply inserts newline and indentation after (){}[]<>; characters.

Commit count: 1

cargo fmt