Skip to content

Commit

Permalink
service: Call inner.poll_ready() in docs when cloning inner (tower-rs…
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
bluk committed Aug 3, 2022
1 parent 19c1a1d commit 8805309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tower-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8805309

Please sign in to comment.