Skip to content

Commit

Permalink
Update echo.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
willemolding authored Apr 10, 2024
1 parent e0c104f commit 4a3cdfd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tower-cartesi/examples/echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn Error + Send + Sync>;
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 {};
Expand All @@ -32,7 +23,7 @@ struct EchoApp;

impl Service<Request> for EchoApp {
type Response = Response;
type Error = Box<dyn Error + Send + Sync>;
type Error = BoxError;
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Expand Down

0 comments on commit 4a3cdfd

Please sign in to comment.