diff --git a/src/cache/s3.rs b/src/cache/s3.rs index c08f8d31..30666263 100644 --- a/src/cache/s3.rs +++ b/src/cache/s3.rs @@ -18,7 +18,7 @@ use cache::{ CacheWrite, Storage, }; -use futures::future::{self, Future}; +use futures::future::Future; use simples3::{ AutoRefreshingProvider, Bucket, @@ -90,7 +90,7 @@ impl Storage for S3Cache { let start = Instant::now(); let data = match entry.finish() { Ok(data) => data, - Err(e) => return future::err(e.into()).boxed(), + Err(e) => return f_err(e), }; let credentials = self.provider.credentials().chain_err(|| { "failed to get AWS credentials" diff --git a/src/compiler/clang.rs b/src/compiler/clang.rs index fe586386..44156e4e 100644 --- a/src/compiler/clang.rs +++ b/src/compiler/clang.rs @@ -109,9 +109,9 @@ fn compile(creator: &T, let write = { let filename = match Path::new(&parsed_args.input).file_name() { Some(name) => name, - None => return future::err("Missing input filename".into()).boxed(), + None => return f_err("Missing input filename"), }; - + Box::new( write_temp_file(pool, filename.as_ref(), preprocessor_result.stdout.clone()) .and_then(move |(tempdir, input)| { @@ -120,7 +120,7 @@ fn compile(creator: &T, Err(_) => future::err("Failed to write input file".into()), } }) - ) +) }; gcc::compile(creator, executable, preprocessor_result, parsed_args, cwd, env_vars, pool, Some(write)) diff --git a/src/compiler/gcc.rs b/src/compiler/gcc.rs index 1cab4b25..2a400560 100644 --- a/src/compiler/gcc.rs +++ b/src/compiler/gcc.rs @@ -18,7 +18,7 @@ use ::compiler::{ }; use compiler::c::{CCompilerImpl, CCompilerKind, ParsedArguments}; use log::LogLevel::Trace; -use futures::future::{self, Future}; +use futures::future::Future; use futures_cpupool::CpuPool; use mock_command::{ CommandCreatorSync, @@ -283,7 +283,7 @@ pub fn compile(creator: &T, let out_file = match parsed_args.outputs.get("obj") { Some(obj) => obj, None => { - return future::err("Missing object file output".into()).boxed() + return f_err("Missing object file output") } };