From 294551c72a33d377514818a03a5d17613aeb6ace Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 5 Mar 2020 19:20:04 -0500 Subject: [PATCH] Fix compiler warnings --- src/bin/sccache-dist/token_check.rs | 2 +- src/compiler/args.rs | 5 ++--- src/compiler/c.rs | 3 +-- src/compiler/msvc.rs | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bin/sccache-dist/token_check.rs b/src/bin/sccache-dist/token_check.rs index 958de2fd8..ae6e3e673 100644 --- a/src/bin/sccache-dist/token_check.rs +++ b/src/bin/sccache-dist/token_check.rs @@ -202,7 +202,7 @@ fn check_mozilla_profile(user: &str, required_groups: &[String], profile: &str) #[test] fn test_auth_verify_check_mozilla_profile() { // A successful response - let profile = r#"{ + let profile = r#"{ "sub": "ad|Mozilla-LDAP|asayers", "https://sso.mozilla.com/claim/groups": [ "everyone", diff --git a/src/compiler/args.rs b/src/compiler/args.rs index c22adaf70..4f0bedafa 100644 --- a/src/compiler/args.rs +++ b/src/compiler/args.rs @@ -956,7 +956,7 @@ mod tests { "-quxbar", // -quxbar is not -qux with a value of bar "-qux=value", ]; - let iter = ArgsIter::new(args.into_iter().map(OsString::from), &ARGS[..]); + let iter = ArgsIter::new(args.iter().map(OsString::from), &ARGS[..]); let expected = vec![ arg!(UnknownFlag("-nomatch")), arg!(WithValue("-foo", ArgData::Foo("value"), Separated)), @@ -1029,8 +1029,7 @@ mod tests { #[test] fn test_arginfo_process_take_concat_arg_delim_doesnt_crash() { - let _ = take_arg!("-foo", OsString, Concatenated('='), Foo) - .process("-foo", || None); + let _ = take_arg!("-foo", OsString, Concatenated('='), Foo).process("-foo", || None); } #[cfg(debug_assertions)] diff --git a/src/compiler/c.rs b/src/compiler/c.rs index e716df6c4..98090f9cc 100644 --- a/src/compiler/c.rs +++ b/src/compiler/c.rs @@ -36,7 +36,6 @@ use std::hash::Hash; use std::io; use std::path::{Path, PathBuf}; use std::process; -use which::which; use crate::errors::*; @@ -551,7 +550,7 @@ impl pkg::ToolchainPackager for CToolchainPackager { if path.is_absolute() { Some(path) } else { - which(path).ok() + which::which(path).ok() } }; diff --git a/src/compiler/msvc.rs b/src/compiler/msvc.rs index 330285646..f205f11fd 100644 --- a/src/compiler/msvc.rs +++ b/src/compiler/msvc.rs @@ -19,7 +19,7 @@ use crate::compiler::{ }; use crate::dist; use crate::mock_command::{CommandCreatorSync, RunCommand}; -use crate::util::{run_input_output, OsStrExt}; +use crate::util::run_input_output; use futures::future::Future; use futures_cpupool::CpuPool; use local_encoding::{Encoder, Encoding};