diff --git a/zebra-state/src/in_memory.rs b/zebra-state/src/in_memory.rs index 0309d783..a494363c 100644 --- a/zebra-state/src/in_memory.rs +++ b/zebra-state/src/in_memory.rs @@ -1,7 +1,7 @@ use super::{Request, Response}; use futures::prelude::*; use std::{ - error::Error, + error, future::Future, pin::Pin, task::{Context, Poll}, @@ -15,9 +15,11 @@ struct ZebraState { index: block_index::BlockIndex, } +type Error = Box; + impl Service for ZebraState { type Response = Response; - type Error = Box; + type Error = Error; type Future = Pin> + Send + 'static>>; @@ -58,8 +60,8 @@ impl Service for ZebraState { pub fn init() -> impl Service< Request, Response = Response, - Error = Box, - Future = impl Future>>, + Error = Error, + Future = impl Future>, > + Send + Clone + 'static {