message: Fix request strategy to not use or patterns (MSRV 1.53)
diff: @@ -29,27 +29,27 @@ impl RequestStrategy {
  return Outcome::Stop;
  }
  + // todo(arlyon): or patterns stabilized in 1.53, clean up on MSRV bump
  + // https://github.com/rust-lang/rust/pull/79278
  +
  + use RequestStrategy::*;
  +
  match (self, status, retry_count) {
  // a strategy of once or idempotent should run once
  - (RequestStrategy::Once | RequestStrategy::Idempotent(_), _, 0) => {
  - Outcome::Continue(None)
  - }
  + (Once, _, 0) => Outcome::Continue(None),
  + (Idempotent(_), _, 0) => Outcome::Continue(None),
  // requests with idempotency keys that hit client
  // errors usually cannot be solved with retries
  // see: https://stripe.com/docs/error-handling#content-errors
  - (
  - RequestStrategy::Retry(_)
  - | RequestStrategy::Idempotent(_)
  - | RequestStrategy::ExponentialBackoff(_),
  - Some(c),
  - _,
  - ) if c.is_client_error() => Outcome::Stop,
  + (Retry(_), Some(c), _) if c.is_client_error() => Outcome::Stop,
  + (Idempotent(_), Some(c), _) if c.is_client_error() => Outcome::Stop,
  + (ExponentialBackoff(_), Some(c), _) if c.is_client_error() => Outcome::Stop,
  // a strategy of retry or exponential backoff should retry with
  // the appropriate delay if the number of retries is less than the max
  - (RequestStrategy::Retry(n), _, x) if x < *n => Outcome::Continue(None),
  - (RequestStrategy::ExponentialBackoff(n), _, x) if x < *n => {
  + (Retry(n), _, x) if x < *n => Outcome::Continue(None),
  + (ExponentialBackoff(n), _, x) if x < *n => {
  Outcome::Continue(Some(calculate_backoff(x)))
  }
  