rust-format
A Rust source code formatting crate with a unified interface for string, file, and
TokenStream
input. It currently supports rustfmt
and prettyplease.
Examples
Simple example using default options of RustFmt:
use ;
Using a custom configuration:
use HashMap;
use ;
Install
[]
= "0.2"
Optional Features
pretty_please- enables prettyplease formatting supporttoken_stream- enables formatting from TokenStream input
License
This project is licensed optionally under either:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)