Skip to content

Commit 725f6d9

Browse files
committed
fix: test
1 parent 9fc81a1 commit 725f6d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/check_guides.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ EOF
2323
tokio = { version = "1", features = ["full"] }
2424
http-body-util = "0.1"
2525
hyper-util = { version = "0.1", features = ["full"] }
26+
tower = { version = "0.4" }
2627
EOF
2728
cargo build --manifest-path "$value/Cargo.toml"
2829
fi

_stable/server/middleware.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Let's create a Logger middleware in [hello-world server](https://hyper.rs/guides
99

1010
Add tower dependency first
1111

12-
```rust
12+
```toml
1313
[dependencies]
1414
hyper = { version = "1", features = ["full"] }
1515
tokio = { version = "1", features = ["full"] }
1616
http-body-util = "0.1"
1717
hyper-util = { version = "0.1", features = ["full"] }
18-
tower = { version = "0.4.13" } // here
18+
tower = { version = "0.4" } // here
1919
```
2020

2121
## Option 1: Use hyper Service trait
@@ -143,7 +143,6 @@ use http_body_util::Full;
143143
use hyper_util::{rt::TokioIo, service::TowerToHyperService};
144144
use tokio::net::TcpListener;
145145
use tower::ServiceBuilder;
146-
use crate::logger::Logger as Logger;
147146
async fn hello(_: Request<Incoming>) -> Result<Response<Full<Bytes>>, Infallible> {
148147
Ok(Response::new(Full::new(Bytes::from("Hello, World!"))))
149148
}

0 commit comments

Comments
 (0)