Skip to content

chore(docs): fix typo #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _stable/server/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let (stream, _) = listener.accept().await?;
let io = TokioIo::new(stream);
tokio::spawn(async move {
// N.B. should use tower service_fn here, since it's reuqired to be implemented tower Service trait before convert to hyper Service!
// N.B. should use tower service_fn here, since it's required to be implemented tower Service trait before convert to hyper Service!
let svc = tower::service_fn(hello);
let svc = ServiceBuilder::new().layer_fn(Logger::new).service(svc);
// Convert it to hyper service
Expand All @@ -244,10 +244,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
});
}
}
}

# fn main() {}
```

[hellp-world]: {{ site.url }}/guides/1/server/hello-world/
[upgrading]: {{ site.url }}/guides/1/upgrading/
[adapter-trait]: {{ site.hyper_util_url }}/latest/hyper_util/service/struct.TowerToHyperService.html
[adapter-trait]: {{ site.hyper_util_url }}/latest/hyper_util/service/struct.TowerToHyperService.html
Loading