refactor: fix `clippy::single_match` (#194)
parent
d95ec5a99f
commit
4e856602f6
|
@ -158,8 +158,7 @@ where
|
||||||
|
|
||||||
// We classify the response which will return None if not
|
// We classify the response which will return None if not
|
||||||
// errors were returned.
|
// errors were returned.
|
||||||
match self.retryable_strategy.handle(&result) {
|
if let Some(Retryable::Transient) = self.retryable_strategy.handle(&result) {
|
||||||
Some(Retryable::Transient) => {
|
|
||||||
// If the response failed and the error type was transient
|
// If the response failed and the error type was transient
|
||||||
// we can safely try to retry the request.
|
// we can safely try to retry the request.
|
||||||
let retry_decision = self.retry_policy.should_retry(start_time, n_past_retries);
|
let retry_decision = self.retry_policy.should_retry(start_time, n_past_retries);
|
||||||
|
@ -185,8 +184,6 @@ where
|
||||||
n_past_retries += 1;
|
n_past_retries += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Some(_) | None => {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Report whether we failed with or without retries.
|
// Report whether we failed with or without retries.
|
||||||
|
|
Loading…
Reference in New Issue