tidy: Remove edition filter exceptions.
These exceptions are no longer necessary.
This commit is contained in:
parent
3eebf9bb80
commit
d9807154d6
@ -2,20 +2,6 @@
|
|||||||
|
|
||||||
use std::path::Path;
|
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 {
|
fn is_edition_2018(mut line: &str) -> bool {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
line == "edition = \"2018\"" || line == "edition = \'2018\'"
|
line == "edition = \"2018\"" || line == "edition = \'2018\'"
|
||||||
@ -24,7 +10,7 @@ fn is_edition_2018(mut line: &str) -> bool {
|
|||||||
pub fn check(path: &Path, bad: &mut bool) {
|
pub fn check(path: &Path, bad: &mut bool) {
|
||||||
super::walk(
|
super::walk(
|
||||||
path,
|
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| {
|
&mut |entry, contents| {
|
||||||
let file = entry.path();
|
let file = entry.path();
|
||||||
let filename = file.file_name().unwrap();
|
let filename = file.file_name().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user