about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2019-01-26 16:44:52 -0800
committerJeremy Fitzhardinge <jeremy@goop.org>2019-02-02 11:43:21 -0800
commit993e8ace8e82d28fc891d9cc84fa4b06754c3b58 (patch)
treecceba46bfa23d6bee337af18e7fe07b5d3e35c8b
parent86c513e605e7982c00587e05a33a1062ca9a5334 (diff)
downloadrust-993e8ace8e82d28fc891d9cc84fa4b06754c3b58.tar.gz
rust-993e8ace8e82d28fc891d9cc84fa4b06754c3b58.zip
Drive-by cleanups to cargo-clippy. No functional change.
-rw-r--r--src/main.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 20466fc567d..208262ca30f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -61,10 +61,8 @@ where
 {
     let mut args = vec!["check".to_owned()];
 
-    let mut found_dashes = false;
     for arg in old_args.by_ref() {
-        found_dashes |= arg == "--";
-        if found_dashes {
+        if arg == "--" {
             break;
         }
         args.push(arg);
@@ -82,11 +80,7 @@ where
     let target_dir = std::env::var_os("CLIPPY_DOGFOOD")
         .map(|_| {
             std::env::var_os("CARGO_MANIFEST_DIR").map_or_else(
-                || {
-                    let mut fallback = std::ffi::OsString::new();
-                    fallback.push("clippy_dogfood");
-                    fallback
-                },
+                || std::ffi::OsString::from("clippy_dogfood"),
                 |d| {
                     std::path::PathBuf::from(d)
                         .join("target")