ronda 0.1.0

A simple ron formatter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fs;
use std::path::PathBuf;

use clap::Parser;
use ron_edit::File;

#[derive(Parser)]
struct Opts {
    file: PathBuf,
}

fn main() {
    let opts = Opts::parse();
    let ron = fs::read_to_string(&opts.file).unwrap();
    let ron = File::try_from(ron.as_str()).unwrap();
    fs::write(opts.file, ronda::format(&ron)).unwrap();
}