[go: up one dir, main page]

clang-format 0.1.0

A basic clang-format Rust wrapper
Documentation

clang-format

A basic clang-format Rust wrapper.

This allows for formatting a given input using clang-format from the system.

let input = r#"
    struct Test {

    };
"#;
let output = clang_format_with_style(input, &ClangFormatStyle::Mozilla);
assert!(output.is_ok());
assert_eq!(output.unwrap(), "\nstruct Test\n{};\n");