From cb1604e2ac2563b1b28f8e68dab59443f586b1aa Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 30 Oct 2024 22:09:34 +0900 Subject: [PATCH] chore(examples): Remove timeout from tower example --- examples/Cargo.toml | 2 +- examples/src/tower/server.rs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index d6cc1b5c6..41de90eb8 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -272,7 +272,7 @@ tracing = ["dep:tracing", "dep:tracing-subscriber"] uds = ["tokio-stream/net", "dep:tower", "dep:hyper", "dep:hyper-util"] streaming = ["tokio-stream", "dep:h2"] mock = ["tokio-stream", "dep:tower", "dep:hyper-util"] -tower = ["dep:tower", "tower?/timeout", "dep:http"] +tower = ["dep:tower", "dep:http"] json-codec = ["dep:serde", "dep:serde_json", "dep:bytes"] compression = ["tonic/gzip"] tls = ["tonic/tls"] diff --git a/examples/src/tower/server.rs b/examples/src/tower/server.rs index b7f524645..591e17671 100644 --- a/examples/src/tower/server.rs +++ b/examples/src/tower/server.rs @@ -1,7 +1,6 @@ use std::{ pin::Pin, task::{Context, Poll}, - time::Duration, }; use tonic::{transport::Server, Request, Response, Status}; use tower::{Layer, Service}; @@ -42,8 +41,6 @@ async fn main() -> Result<(), Box> { // The stack of middleware that our service will be wrapped in let layer = tower::ServiceBuilder::new() - // Apply middleware from tower - .timeout(Duration::from_secs(30)) // Apply our own middleware .layer(MyMiddlewareLayer::default()) // Interceptors can be also be applied as middleware