Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Oct 10, 2023
1 parent dad5388 commit 27b2f81
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions object_store/src/client/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ impl Error {
/// Returns the status code associated with this error if any
pub fn status(&self) -> Option<StatusCode> {
match self {
Error::BareRedirect => None,
Error::Client { status, .. } => Some(*status),
Error::Response { source, .. } => source.status(),
Self::BareRedirect => None,
Self::Client { status, .. } => Some(*status),
Self::Response { source, .. } => source.status(),
}
}

/// Returns the error body if any
pub fn body(&self) -> Option<&str> {
match self {
Error::Client { body, .. } => body.as_deref(),
Error::BareRedirect => None,
Error::Response { .. } => None,
Self::Client { body, .. } => body.as_deref(),
Self::BareRedirect => None,
Self::Response { .. } => None,
}
}

Expand Down

0 comments on commit 27b2f81

Please sign in to comment.