diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 4dedf6bfe779b..c3fb0d3913fdf 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -29,19 +29,19 @@ static LICENSES: &'static [&'static str] = &[ // tooling. It is _crucial_ that no exception crates be dependencies // of the Rust runtime (std / test). static EXCEPTIONS: &'static [&'static str] = &[ - "mdbook", // MPL2, mdbook - "openssl", // BSD+advertising clause, cargo, mdbook - "pest", // MPL2, mdbook via handlebars - "thread-id", // Apache-2.0, mdbook - "toml-query", // MPL-2.0, mdbook - "is-match", // MPL-2.0, mdbook - "cssparser", // MPL-2.0, rustdoc - "smallvec", // MPL-2.0, rustdoc + "mdbook", // MPL2, mdbook + "openssl", // BSD+advertising clause, cargo, mdbook + "pest", // MPL2, mdbook via handlebars + "thread-id", // Apache-2.0, mdbook + "toml-query", // MPL-2.0, mdbook + "is-match", // MPL-2.0, mdbook + "cssparser", // MPL-2.0, rustdoc + "smallvec", // MPL-2.0, rustdoc "fuchsia-zircon-sys", // BSD-3-Clause, rustdoc, rustc, cargo - "fuchsia-zircon", // BSD-3-Clause, rustdoc, rustc, cargo (jobserver & tempdir) - "cssparser-macros", // MPL-2.0, rustdoc - "selectors", // MPL-2.0, rustdoc - "clippy_lints", // MPL-2.0 rls + "fuchsia-zircon", // BSD-3-Clause, rustdoc, rustc, cargo (jobserver & tempdir) + "cssparser-macros", // MPL-2.0, rustdoc + "selectors", // MPL-2.0, rustdoc + "clippy_lints", // MPL-2.0 rls ]; pub fn check(path: &Path, bad: &mut bool) { @@ -57,7 +57,8 @@ pub fn check(path: &Path, bad: &mut bool) { if dir.path() .to_str() .unwrap() - .contains(&format!("src/vendor/{}", exception)) { + .contains(&format!("src/vendor/{}", exception)) + { continue 'next_path; } } @@ -102,7 +103,7 @@ fn extract_license(line: &str) -> String { let first_quote = line.find('"'); let last_quote = line.rfind('"'); if let (Some(f), Some(l)) = (first_quote, last_quote) { - let license = &line[f + 1 .. l]; + let license = &line[f + 1..l]; license.into() } else { "bad-license-parse".into()