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

retry: Change Policy to accept &mut self #681

Merged
merged 10 commits into from
Aug 23, 2022
Prev Previous commit
Next Next commit
Update doc tests for Budget
  • Loading branch information
LucioFranco committed Aug 15, 2022
commit a930936d9d3b6f76d7f5f439a1c951762b005ab5
8 changes: 4 additions & 4 deletions tower/src/retry/budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
//! }
//!
//! impl<E> Policy<Req, Res, E> for RetryPolicy {
//! type Future = future::Ready<Self>;
//! type Future = future::Ready<()>;
//!
//! fn retry(&self, req: &mut Req, result: &mut Result<Res, E>) -> Option<Self::Future> {
//! fn retry(&mut self, req: &mut Req, result: &mut Result<Res, E>) -> Option<Self::Future> {
//! match result {
//! Ok(_) => {
//! // Treat all `Response`s as success,
Expand All @@ -60,12 +60,12 @@
//! }
//!
//! // Try again!
//! Some(future::ready(self.clone()))
//! Some(future::ready(()))
//! }
//! }
//! }
//!
//! fn clone_request(&self, req: &Req) -> Option<Req> {
//! fn clone_request(&mut self, req: &Req) -> Option<Req> {
//! Some(req.clone())
//! }
//! }
Expand Down