Skip to content
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

docs: fix grammar #749

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Changes from 1 commit
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 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
hawkw marked this conversation as resolved.
Show resolved Hide resolved
// 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
hawkw marked this conversation as resolved.
Show resolved Hide resolved
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.
hawkw marked this conversation as resolved.
Show resolved Hide resolved
3. If neither future is ready return `Poll::Pending`.

We might try:
Expand Down
Loading