rsformat 0.1.0

A program to incrementally reformat changed files using rustfmt.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (C) 2025 Daniel Mueller <deso@posteo.net>
// SPDX-License-Identifier: GPL-3.0-or-later

use std::io::stdin;
use std::io::Result;

use rsformat::format;

use diff_parse::Parser;

fn main() -> Result<()> {
  let mut parser = Parser::new();
  parser.parse(stdin().lock())?;

  // TODO: We may want to catch BrokenPipe errors here and exit
  //       gracefully.
  format(parser.diffs())
}