mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Clean up function names for checkstyle output.
This commit is contained in:
parent
add80569ff
commit
5632831bd1
@ -12,7 +12,7 @@ use std::io::{self, Write, Read, stdout};
|
||||
use config::WriteMode;
|
||||
|
||||
|
||||
pub fn output_heading(mode: WriteMode) -> Result<(), io::Error> {
|
||||
pub fn output_header(mode: WriteMode) -> Result<(), io::Error> {
|
||||
let stdout = stdout();
|
||||
let mut stdout = stdout.lock();
|
||||
if mode == WriteMode::Checkstyle {
|
||||
@ -25,7 +25,7 @@ pub fn output_heading(mode: WriteMode) -> Result<(), io::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn output_footing(mode: WriteMode) -> Result<(), io::Error> {
|
||||
pub fn output_footer(mode: WriteMode) -> Result<(), io::Error> {
|
||||
let stdout = stdout();
|
||||
let mut stdout = stdout.lock();
|
||||
if mode == WriteMode::Checkstyle {
|
||||
|
@ -19,7 +19,7 @@ use std::io::{self, Write, Read, stdout, BufWriter};
|
||||
|
||||
use config::{NewlineStyle, Config, WriteMode};
|
||||
use rustfmt_diff::{make_diff, print_diff, Mismatch};
|
||||
use checkstyle::{output_heading, output_footing, output_checkstyle_file};
|
||||
use checkstyle::{output_header, output_footer, output_checkstyle_file};
|
||||
|
||||
// A map of the files of a crate, with their new content
|
||||
pub type FileMap = HashMap<String, StringBuffer>;
|
||||
@ -35,11 +35,11 @@ pub fn write_all_files(file_map: &FileMap,
|
||||
mode: WriteMode,
|
||||
config: &Config)
|
||||
-> Result<(), io::Error> {
|
||||
output_heading(mode).ok();
|
||||
output_header(mode).ok();
|
||||
for filename in file_map.keys() {
|
||||
try!(write_file(&file_map[filename], filename, mode, config));
|
||||
}
|
||||
output_footing(mode).ok();
|
||||
output_footer(mode).ok();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user