From 4a3cdfd67817976efb2b69f94f85f75691a8a858 Mon Sep 17 00:00:00 2001 From: Willem Olding Date: Wed, 10 Apr 2024 14:13:40 +1000 Subject: [PATCH] Update echo.rs --- tower-cartesi/examples/echo.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tower-cartesi/examples/echo.rs b/tower-cartesi/examples/echo.rs index 0eedafa..4d08020 100644 --- a/tower-cartesi/examples/echo.rs +++ b/tower-cartesi/examples/echo.rs @@ -6,19 +6,10 @@ use std::pin::Pin; use std::task::{Context, Poll}; use tower_cartesi::{listen_http, Request, Response}; -use tower_service::Service; - -type BoxError = Box; +use tower_service::{BoxError, Service}; #[tokio::main] async fn main() -> Result<(), BoxError> { - let subscriber = tracing_subscriber::fmt() - .without_time() - .with_max_level(tracing::Level::INFO) - .compact() - .finish(); - tracing::subscriber::set_global_default(subscriber)?; - let server_addr = env::var("ROLLUP_HTTP_SERVER_URL")?; let mut app = EchoApp {}; @@ -32,7 +23,7 @@ struct EchoApp; impl Service for EchoApp { type Response = Response; - type Error = Box; + type Error = BoxError; type Future = Pin> + Send>>; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> {