Fold fallback::Status::reset() into its (only) caller.
This commit is contained in:
parent
9bf2fe3aca
commit
b752c6c771
|
@ -50,18 +50,13 @@ impl Status {
|
|||
self.retry_at
|
||||
}
|
||||
|
||||
/// Restore this `Status` to its original state.
|
||||
pub(crate) fn reset(&mut self) {
|
||||
self.retry_at = None;
|
||||
self.delay = RetryDelay::from_duration(FALLBACK_RETRY_FLOOR);
|
||||
}
|
||||
|
||||
/// Record that the associated fallback directory has been used successfully.
|
||||
///
|
||||
/// This should only be done after successfully handling a whole reply from the
|
||||
/// directory.
|
||||
pub(crate) fn note_success(&mut self) {
|
||||
self.reset();
|
||||
self.retry_at = None;
|
||||
self.delay = RetryDelay::from_duration(FALLBACK_RETRY_FLOOR);
|
||||
}
|
||||
|
||||
/// Record that the associated fallback directory has failed.
|
||||
|
|
Loading…
Reference in New Issue