From bd215dc0e4e3165a783e59cd039a2da7cf9a39aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 25 Jan 2021 14:42:50 +0100 Subject: [PATCH] async index reader: typedef ReadFuture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- src/backup/async_index_reader.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backup/async_index_reader.rs b/src/backup/async_index_reader.rs index 60c68d4f..20a37e7e 100644 --- a/src/backup/async_index_reader.rs +++ b/src/backup/async_index_reader.rs @@ -15,6 +15,8 @@ use super::IndexFile; use super::read_chunk::AsyncReadChunk; use super::index::ChunkReadInfo; +type ReadFuture = dyn Future), Error>> + Send + 'static; + // FIXME: This enum may not be required? // - Put the `WaitForData` case directly into a `read_future: Option<>` // - make the read loop as follows: @@ -28,7 +30,7 @@ use super::index::ChunkReadInfo; #[allow(clippy::enum_variant_names)] enum AsyncIndexReaderState { NoData, - WaitForData(Pin), Error>> + Send + 'static>>), + WaitForData(Pin>>), HaveData, }