diff --git a/src/cache/disk.rs b/src/cache/disk.rs index b5ee2de3b..a71c68b51 100644 --- a/src/cache/disk.rs +++ b/src/cache/disk.rs @@ -18,7 +18,6 @@ use cache::{ CacheWrite, Storage, }; -use futures::Future; use futures_cpupool::CpuPool; use lru_disk_cache::LruDiskCache; use lru_disk_cache::Error as LruError; @@ -62,7 +61,7 @@ impl Storage for DiskCache { let path = make_key_path(key); let lru = self.lru.clone(); let key = key.to_owned(); - self.pool.spawn_fn(move || { + Box::new(self.pool.spawn_fn(move || { let mut lru = lru.lock().unwrap(); let f = match lru.get(&path) { Ok(f) => f, @@ -78,7 +77,7 @@ impl Storage for DiskCache { }; let hit = CacheRead::from(f)?; Ok(Cache::Hit(hit)) - }).boxed() + })) } fn put(&self, key: &str, entry: CacheWrite) -> SFuture { @@ -87,12 +86,12 @@ impl Storage for DiskCache { trace!("DiskCache::finish_put({})", key); let lru = self.lru.clone(); let key = make_key_path(key); - self.pool.spawn_fn(move || { + Box::new(self.pool.spawn_fn(move || { let start = Instant::now(); let v = entry.finish()?; lru.lock().unwrap().insert_bytes(key, &v)?; Ok(start.elapsed()) - }).boxed() + })) } fn location(&self) -> String { diff --git a/src/mock_command.rs b/src/mock_command.rs index a131594c5..9e898d235 100644 --- a/src/mock_command.rs +++ b/src/mock_command.rs @@ -357,7 +357,7 @@ impl CommandChild for MockChild { fn take_stderr(&mut self) -> Option>> { self.stderr.take() } fn wait(mut self) -> Box> { - future::result(self.wait_result.take().unwrap()).boxed() + Box::new(future::result(self.wait_result.take().unwrap())) } @@ -370,7 +370,7 @@ impl CommandChild for MockChild { stderr: stderr.map(|c| c.into_inner()).unwrap_or(vec!()), }) }); - future::result(result).boxed() + Box::new(future::result(result)) } } diff --git a/src/simples3/credential.rs b/src/simples3/credential.rs index d8e3c5f22..9aebb30a8 100644 --- a/src/simples3/credential.rs +++ b/src/simples3/credential.rs @@ -87,7 +87,7 @@ pub struct EnvironmentProvider; impl ProvideAwsCredentials for EnvironmentProvider { fn credentials(&self) -> SFuture { - future::result(credentials_from_environment()).boxed() + Box::new(future::result(credentials_from_environment())) } } @@ -189,7 +189,7 @@ impl ProvideAwsCredentials for ProfileProvider { let result = result.and_then(|mut profiles| { profiles.remove(self.profile()).ok_or("profile not found".into()) }); - future::result(result).boxed() + Box::new(future::result(result)) } }