Skip to content

Commit

Permalink
tidy: Remove edition filter exceptions.
Browse files Browse the repository at this point in the history
These exceptions are no longer necessary.
  • Loading branch information
ehuss authored and zaharidichev committed Mar 12, 2021
1 parent 76e7bef commit b3e0a25
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/tools/tidy/src/edition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@
use std::path::Path;

fn filter_dirs(path: &Path) -> bool {
// FIXME: just use super::filter_dirs after the submodules are updated.
if super::filter_dirs(path) {
return true;
}
let skip = [
"src/doc/book/second-edition",
"src/doc/book/2018-edition",
"src/doc/book/ci/stable-check",
"src/doc/reference/stable-check",
];
skip.iter().any(|p| path.ends_with(p))
}

fn is_edition_2018(mut line: &str) -> bool {
line = line.trim();
line == "edition = \"2018\"" || line == "edition = \'2018\'"
Expand All @@ -24,7 +10,7 @@ fn is_edition_2018(mut line: &str) -> bool {
pub fn check(path: &Path, bad: &mut bool) {
super::walk(
path,
&mut |path| filter_dirs(path) || path.ends_with("src/test"),
&mut |path| super::filter_dirs(path) || path.ends_with("src/test"),
&mut |entry, contents| {
let file = entry.path();
let filename = file.file_name().unwrap();
Expand Down

0 comments on commit b3e0a25

Please sign in to comment.