Skip to content

Commit

Permalink
fix cargo clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
zjregee committed Mar 1, 2024
1 parent fffb809 commit 464ef69
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions core/src/services/swift/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,12 @@ impl Builder for SwiftBuilder {
debug!("backend use root {}", root);

// Ensure that there is at least one way to build the URL prefix.
if self.endpoint.is_none() || self.account.is_none() {
if self.storage_url.is_none() {
// It is recommended that users configure through the endpoint and account.
return Err(Error::new(
ErrorKind::ConfigInvalid,
"missing endpoint or account for Swift",
));
}
if (self.endpoint.is_none() || self.account.is_none()) && self.storage_url.is_none() {
// It is recommended that users configure through the endpoint and account.
return Err(Error::new(
ErrorKind::ConfigInvalid,
"missing endpoint or account for Swift",
));
}

let endpoint = match self.endpoint.take() {
Expand Down

0 comments on commit 464ef69

Please sign in to comment.