From 47a706682cb5fd47b61fd8451c1a781c4f16c81e Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 19 Mar 2018 09:26:05 +0100 Subject: [PATCH 1/1] Version bump --- CHANGELOG.md | 3 +++ Cargo.toml | 4 ++-- clippy_lints/Cargo.toml | 2 +- src/main.rs | 16 ++++++++++++---- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 970b458e2a8..452a08f6ed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.0.189 +* Rustup to *rustc 1.26.0-nightly (5508b2714 2018-03-18)* + ## 0.0.188 * Rustup to *rustc 1.26.0-nightly (392645394 2018-03-15)* * New lint: [`while_immutable_condition`] diff --git a/Cargo.toml b/Cargo.toml index 09eb34bf5fd..65714e60746 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clippy" -version = "0.0.188" +version = "0.0.189" authors = [ "Manish Goregaokar ", "Andre Bogus ", @@ -37,7 +37,7 @@ path = "src/driver.rs" [dependencies] # begin automatic update -clippy_lints = { version = "0.0.188", path = "clippy_lints" } +clippy_lints = { version = "0.0.189", path = "clippy_lints" } # end automatic update cargo_metadata = "0.5" regex = "0.2" diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index 38b4a0ea18c..8a155957ed2 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "clippy_lints" # begin automatic update -version = "0.0.188" +version = "0.0.189" # end automatic update authors = [ "Manish Goregaokar ", diff --git a/src/main.rs b/src/main.rs index 95e1fc0c28c..81933d5769a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,10 +59,18 @@ pub fn main() { return; } - let manifest_path_arg = std::env::args() + let mut manifest_path_arg = std::env::args() .skip(2) - .find(|val| val.starts_with("--manifest-path=")) - .map(|val| val["--manifest-path=".len()..].to_owned()); + .skip_while(|val| !val.starts_with("--manifest-path")); + let manifest_path_arg = manifest_path_arg.next().and_then(|val| { + if val == "--manifest-path" { + manifest_path_arg.next() + } else if val.starts_with("--manifest-path=") { + Some(val["--manifest-path=".len()..].to_owned()) + } else { + None + } + }); let mut metadata = if let Ok(metadata) = cargo_metadata::metadata(manifest_path_arg.as_ref().map(AsRef::as_ref)) { metadata @@ -140,7 +148,7 @@ pub fn main() { for target in package.targets { let args = std::env::args() - .skip(2) + .skip(1) .filter(|a| a != "--all" && !a.starts_with("--manifest-path=")); let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args); -- 2.44.0