Remove output-file and target-version from formatter CLI (#7135)

This commit is contained in:
Charlie Marsh 2023-09-05 11:04:18 +02:00 committed by GitHub
parent 0465b03282
commit 10a8e4a225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 20 deletions

View file

@ -1,7 +1,5 @@
use std::fmt::{Display, Formatter};
use std::fs::File;
use std::io;
use std::io::{BufWriter, Write};
use std::num::NonZeroU16;
use std::path::{Path, PathBuf};
use std::time::Instant;
@ -106,15 +104,10 @@ pub(crate) fn format(
// Report on the formatting changes.
if log_level >= LogLevel::Default {
let mut writer: Box<dyn Write> = match &cli.output_file {
Some(path) => {
colored::control::set_override(false);
let file = File::create(path)?;
Box::new(BufWriter::new(file))
}
_ => Box::new(BufWriter::new(io::stdout())),
};
writeln!(writer, "{summary}")?;
#[allow(clippy::print_stdout)]
{
println!("{summary}");
}
}
match mode {