Skip to content

Commit

Permalink
refactor: Make room for parent function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Page committed Jan 2, 2021
1 parent bc90bac commit 220a79f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benches/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fn bench_check_file(data: &str, b: &mut test::Bencher) {
let parser = typos::tokens::Tokenizer::new();
let checks = typos_cli::checks::TyposSettings::new().build_typos();
b.iter(|| {
checks.check_file(
checks.check_file_content(
sample_path.path(),
true,
&parser,
Expand Down
6 changes: 3 additions & 3 deletions src/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub trait Check: Send + Sync {
Ok(())
}

fn check_file(
fn check_file_content(
&self,
path: &std::path::Path,
explicit: bool,
Expand Down Expand Up @@ -401,7 +401,7 @@ impl Check for Files {
Ok(())
}

fn check_file(
fn check_file_content(
&self,
path: &std::path::Path,
_explicit: bool,
Expand Down Expand Up @@ -492,7 +492,7 @@ fn check_entry(
if entry.file_type().map(|t| t.is_file()).unwrap_or(true) {
let explicit = entry.depth() == 0;
checks.check_filename(entry.path(), parser, dictionary, reporter)?;
checks.check_file(entry.path(), explicit, parser, dictionary, reporter)?;
checks.check_file_content(entry.path(), explicit, parser, dictionary, reporter)?;
}

Ok(())
Expand Down

0 comments on commit 220a79f

Please sign in to comment.