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, }