Navigation Menu

Skip to content

Commit

Permalink
lintcheck: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Mar 11, 2021
1 parent b068b74 commit 528e464
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lintcheck/Cargo.toml
Expand Up @@ -2,7 +2,13 @@
name = "lintcheck"
version = "0.0.1"
authors = ["The Rust Clippy Developers"]
description = "tool to monitor impact of changes in Clippys lints on a part of the ecosystem"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/rust-clippy"
categories = ["development-tools"]
edition = "2018"
publish = false

[dependencies]
clap = "2.33"
Expand Down
4 changes: 2 additions & 2 deletions lintcheck/src/main.rs
Expand Up @@ -499,7 +499,7 @@ fn parse_json_message(json_message: &str, krate: &Crate) -> ClippyWarning {

// /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.63/src/custom_keyword.rs
let path = PathBuf::from(file);
let mut piter = path.into_iter();
let mut piter = path.iter();
// consume all elements until we find ".cargo", so that "/home/matthias" is skipped
let _: Option<&OsStr> = piter.find(|x| x == &std::ffi::OsString::from(".cargo"));
// collect the remaining segments
Expand Down Expand Up @@ -594,7 +594,7 @@ fn is_in_clippy_root() -> bool {
/// This function panics if the clippy binaries don't exist
/// or if lintcheck is executed from the wrong directory (aka none-repo-root)
pub fn main() {
// assert that we launch lintcheck from the repo root (via cargo dev-lintcheck)
// assert that we launch lintcheck from the repo root (via cargo lintcheck)
if !is_in_clippy_root() {
eprintln!("lintcheck needs to be run from clippys repo root!\nUse `cargo lintcheck` alternatively.");
std::process::exit(3);
Expand Down

0 comments on commit 528e464

Please sign in to comment.