From 3c0facc787ec3751112f46e17dace0bf4d445e9b Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 26 Aug 2019 13:40:24 +0200 Subject: [PATCH] src/client/remote_chunk_reader.rs: switch to async Signed-off-by: Wolfgang Bumiller --- src/client/remote_chunk_reader.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/remote_chunk_reader.rs b/src/client/remote_chunk_reader.rs index 35efd3ce..7fd700cf 100644 --- a/src/client/remote_chunk_reader.rs +++ b/src/client/remote_chunk_reader.rs @@ -1,7 +1,7 @@ -use failure::*; -use futures::future::Future; -use std::sync::Arc; use std::collections::HashMap; +use std::sync::Arc; + +use failure::*; use super::BackupReader; use crate::backup::{ReadChunk, DataChunk, CryptConfig}; @@ -41,7 +41,7 @@ impl ReadChunk for RemoteChunkReader { let use_cache = self.cache_hint.contains_key(digest); - let chunk_data = self.client.download_chunk(&digest, writer).wait()?; + let chunk_data = futures::executor::block_on(self.client.download_chunk(&digest, writer))?; let chunk = DataChunk::from_raw(chunk_data, *digest)?; chunk.verify_crc()?;