Skip to content

Commit

Permalink
Clean up function names for checkstyle output.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 15, 2016
1 parent add8056 commit 5632831
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/checkstyle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/filemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand All @@ -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(())
}
Expand Down

0 comments on commit 5632831

Please sign in to comment.