From 071a1b26e6fbf3e51978e3ffb0d1fef330042940 Mon Sep 17 00:00:00 2001 From: david-perez Date: Wed, 3 Nov 2021 20:03:46 +0100 Subject: [PATCH] Fix typos (#461) --- axum/CHANGELOG.md | 2 +- axum/src/body.rs | 2 +- axum/src/docs/routing/route.md | 2 +- axum/src/lib.rs | 2 +- axum/src/routing/mod.rs | 2 +- axum/src/routing/route.rs | 2 +- examples/chat/src/main.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index b94c87fe..11e01202 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -350,7 +350,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ``` - SSE: - **added:** Add `response::sse::Sse`. This implements SSE using a response rather than a service ([#98](https://github.com/tokio-rs/axum/pull/98)) - - **changed:** Remove `axum::sse`. Its been replaced by `axum::response::sse` ([#98](https://github.com/tokio-rs/axum/pull/98)) + - **changed:** Remove `axum::sse`. It has been replaced by `axum::response::sse` ([#98](https://github.com/tokio-rs/axum/pull/98)) Handler using SSE in 0.1: ```rust diff --git a/axum/src/body.rs b/axum/src/body.rs index cc11a15c..76e3019f 100644 --- a/axum/src/body.rs +++ b/axum/src/body.rs @@ -18,7 +18,7 @@ pub use bytes::Bytes; /// A boxed [`Body`] trait object. /// -/// This is used in axum as the response body type for applications. Its +/// This is used in axum as the response body type for applications. It's /// necessary to unify multiple response bodies types into one. pub type BoxBody = http_body::combinators::UnsyncBoxBody; diff --git a/axum/src/docs/routing/route.md b/axum/src/docs/routing/route.md index 6e880694..db4ca3a0 100644 --- a/axum/src/docs/routing/route.md +++ b/axum/src/docs/routing/route.md @@ -101,7 +101,7 @@ let app = Router::new() .route( // Any request to `/` goes to a service "/", - // Services who's response body is not `axum::body::BoxBody` + // Services whose response body is not `axum::body::BoxBody` // can be wrapped in `axum::service::any` (or one of the other routing filters) // to have the response body mapped service::any(service_fn(|_: Request| async { diff --git a/axum/src/lib.rs b/axum/src/lib.rs index b582a529..74eaf0be 100644 --- a/axum/src/lib.rs +++ b/axum/src/lib.rs @@ -207,7 +207,7 @@ //! tower = "" //! ``` //! -//! The `"full"` feature for hyper and tokio isn't strictly necessary but its +//! The `"full"` feature for hyper and tokio isn't strictly necessary but it's //! the easiest way to get started. //! //! Note that [`hyper::Server`] is re-exported by axum so if thats all you need diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index e856127d..86ebff78 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -282,7 +282,7 @@ where self } - /// Convert this router into a [`MakeService`], that is a [`Service`] who's + /// Convert this router into a [`MakeService`], that is a [`Service`] whose /// response is another service. /// /// This is useful when running your application with hyper's diff --git a/axum/src/routing/route.rs b/axum/src/routing/route.rs index 82fc1447..26d4975a 100644 --- a/axum/src/routing/route.rs +++ b/axum/src/routing/route.rs @@ -16,7 +16,7 @@ use tower_service::Service; /// How routes are stored inside a [`Router`](super::Router). /// -/// You normally shouldn't need to care about this type. Its used in +/// You normally shouldn't need to care about this type. It's used in /// [`Router::layer`](super::Router::layer). pub struct Route(CloneBoxService, Response, Infallible>); diff --git a/examples/chat/src/main.rs b/examples/chat/src/main.rs index 68f0d7f2..d7859536 100644 --- a/examples/chat/src/main.rs +++ b/examples/chat/src/main.rs @@ -60,7 +60,7 @@ async fn websocket(stream: WebSocket, state: Arc) { // By splitting we can send and receive at the same time. let (mut sender, mut receiver) = stream.split(); - // Username gets set in the receive loop, if its valid + // Username gets set in the receive loop, if it's valid. let mut username = String::new(); // Loop until a text message is found.