service: Call inner.poll_ready() in docs when cloning inner (#679)

- The documentation should call self.inner.poll_ready() in the
  Wrapper::poll_ready() call to emphasize that self.inner may only be
  ready on the original instance and not a clone of inner.
This commit is contained in:
Bryant Luk 2022-08-03 11:56:39 -05:00 committed by GitHub
parent 19c1a1dbb8
commit 8805309486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,7 @@ use std::task::{Context, Poll};
/// type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
///
/// fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
/// Poll::Ready(Ok(()))
/// self.inner.poll_ready(cx)
/// }
///
/// fn call(&mut self, req: R) -> Self::Future {
@ -295,7 +295,7 @@ use std::task::{Context, Poll};
/// type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
///
/// fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
/// Poll::Ready(Ok(()))
/// self.inner.poll_ready(cx)
/// }
///
/// fn call(&mut self, req: R) -> Self::Future {