diff --git a/src/commands.rs b/src/commands.rs index cfdf70f057..608d97466b 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -152,7 +152,6 @@ fn run_server_process() -> Result { use std::ptr; use std::time::Duration; use tokio::reactor::Handle; - use tokio::runtime::current_thread::Runtime; use tokio_named_pipes::NamedPipe; use uuid::Uuid; use winapi::shared::minwindef::{DWORD, FALSE, LPVOID, TRUE}; diff --git a/src/compiler/msvc.rs b/src/compiler/msvc.rs index b58455943c..5c26f3ceb9 100644 --- a/src/compiler/msvc.rs +++ b/src/compiler/msvc.rs @@ -188,7 +188,7 @@ fn encode_path(dst: &mut dyn Write, path: &Path) -> io::Result<()> { } #[cfg(windows)] -fn encode_path(dst: &mut Write, path: &Path) -> io::Result<()> { +fn encode_path(dst: &mut dyn Write, path: &Path) -> io::Result<()> { use std::os::windows::prelude::*; use local_encoding::windows::wide_char_to_multi_byte; use winapi::um::winnls::CP_OEMCP; diff --git a/src/dist/mod.rs b/src/dist/mod.rs index 0b23fec8fe..de1c660aef 100644 --- a/src/dist/mod.rs +++ b/src/dist/mod.rs @@ -57,7 +57,7 @@ mod path_transform { use std::path::{Component, Components, Path, PathBuf, Prefix, PrefixComponent}; use std::str; - fn take_prefix<'a>(components: &'a mut Components) -> Option> { + fn take_prefix<'a>(components: &'a mut Components<'_>) -> Option> { let prefix = components.next()?; let pc = match prefix { Component::Prefix(pc) => pc, @@ -70,7 +70,7 @@ mod path_transform { Some(pc) } - fn transform_prefix_component(pc: PrefixComponent) -> Option { + fn transform_prefix_component(pc: PrefixComponent<'_>) -> Option { match pc.kind() { // Transforming these to the same place means these may flip-flop // in the tracking map, but they're equivalent so not really an diff --git a/src/util.rs b/src/util.rs index f045c1a5e7..b197010b83 100644 --- a/src/util.rs +++ b/src/util.rs @@ -18,7 +18,6 @@ use futures_cpupool::CpuPool; use crate::mock_command::{CommandChild, RunCommand}; use ring::digest::{Context, SHA512}; use serde::Serialize; -use std::env; use std::ffi::{OsStr, OsString}; use std::fs::File; use std::hash::Hasher; @@ -433,6 +432,7 @@ mod http_extension { #[cfg(not(windows))] pub fn daemonize() -> Result<()> { use daemonize::Daemonize; + use std::env; use std::mem; match env::var("SCCACHE_NO_DAEMON") {