From 10bedca796b1ca488520659e0ddff71b81056d3a Mon Sep 17 00:00:00 2001 From: jtroo Date: Sun, 1 Aug 2021 11:55:09 -0700 Subject: [PATCH] Fix typos in service docs (#74) This commit fixes some typos and improves the grammar/structure of some sections. --- src/service/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/service/mod.rs b/src/service/mod.rs index 46a7728b..7e90468d 100644 --- a/src/service/mod.rs +++ b/src/service/mod.rs @@ -28,8 +28,8 @@ //! //! Generally routing to one of multiple services and backpressure doesn't mix //! well. Ideally you would want ensure a service is ready to receive a request -//! before calling the it. However in order to know which service to call you -//! need the request... +//! before calling it. However, in order to know which service to call, you need +//! the request... //! //! One approach is to not consider the router service itself ready until all //! destination services are ready. That is the approach used by @@ -47,10 +47,10 @@ //! about backpressure. At the very least you should [load shed] so requests are //! dropped quickly and don't keep piling up. //! -//! It also means if `poll_ready` returns an error that error will be returned -//! in the response future from `call`, and _not_ from `poll_ready`. In that -//! case the underlying service will _not_ be discarded and will continue to be -//! used for future requests. Services that expect to be discarded if +//! It also means that if `poll_ready` returns an error then that error will be +//! returned in the response future from `call` and _not_ from `poll_ready`. In +//! that case, the underlying service will _not_ be discarded and will continue +//! to be used for future requests. Services that expect to be discarded if //! `poll_ready` fails should _not_ be used with axum. //! //! One possible approach is to only apply backpressure sensitive middleware @@ -539,7 +539,7 @@ pub trait ServiceExt: /// /// `handle_error` takes a closure that will map errors from the service /// into responses. The closure's return type must be `Result` where - /// `T` implements [`IntoIntoResponse`](crate::response::IntoResponse). + /// `T` implements [`IntoResponse`](crate::response::IntoResponse). /// /// # Example /// @@ -586,7 +586,7 @@ pub trait ServiceExt: /// Check that your service cannot fail. /// - /// That is its error type is [`Infallible`]. + /// That is, its error type is [`Infallible`]. fn check_infallible(self) -> Self where Self: Service, Response = Response, Error = Infallible> + Sized,