From 39adf5c509a1b2141f679654d8317524ca96b58b Mon Sep 17 00:00:00 2001 From: Eric Crosson Date: Mon, 6 Nov 2023 15:27:25 -0600 Subject: [PATCH] docs: fix grammar (#749) 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 --- guides/building-a-middleware-from-scratch.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/building-a-middleware-from-scratch.md b/guides/building-a-middleware-from-scratch.md index 6bbfb66a6..d6a008148 100644 --- a/guides/building-a-middleware-from-scratch.md +++ b/guides/building-a-middleware-from-scratch.md @@ -74,7 +74,7 @@ where type Future = S::Future; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - // 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) } @@ -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: