From b80428ba7dfcc607dfaac07022c360159ee1dc79 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 7 Nov 2024 07:02:34 +0900 Subject: [PATCH] chore(examples): Remove timeout from tower example (#2030) --- 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 08499921c..a5d2c812b 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