Skip to content

Commit

Permalink
docs: fix grammar (#749)
Browse files Browse the repository at this point in the history
This commit uses the correct form of "it's".

"Its" is possessive describes a noun, while "it's" is a contraction that
is short for "it is". Since "ready" is not a noun, we must use the
contraction in this case.

In addition, this commit adds some missing commas.

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
EricCrosson and hawkw authored Nov 6, 2023
1 parent a4c20a3 commit 39adf5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guides/building-a-middleware-from-scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ where
type Future = S::Future;

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
// Our middleware doesn't care about backpressure so its ready as long
// Our middleware doesn't care about backpressure, so it's ready as long
// as the inner service is ready.
self.inner.poll_ready(cx)
}
Expand Down Expand Up @@ -192,9 +192,9 @@ where

Ideally we want to write something like this:

1. First poll `self.response_future` and if its ready return the response or error it
1. First poll `self.response_future`, and if it's ready, return the response or error it
resolved to.
2. Otherwise poll `self.sleep` and if its ready return an error.
2. Otherwise, poll `self.sleep`, and if it's ready, return an error.
3. If neither future is ready return `Poll::Pending`.

We might try:
Expand Down

0 comments on commit 39adf5c

Please sign in to comment.