mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
lintcheck: fix clippy warnings
This commit is contained in:
parent
b068b742ee
commit
528e464b4f
2 changed files with 8 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue