Skip to content

Commit

Permalink
Removed redundant parentheses in conditional statements to fix SwiftL…
Browse files Browse the repository at this point in the history
…int warnings
  • Loading branch information
iammajid committed Oct 15, 2024
1 parent 9e5ae76 commit e1ed0b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public class DropboxCloudProvider: CloudProvider {
}
if let networkError = networkError {
CloudAccessDDLogDebug("DropboxCloudProvider: fetchItemMetadata(at: \(cloudPath.path)) failed with networkError: \(networkError)")
reject(self.convertRequestError(networkError))
reject(self.convertRequestError(networkError))
return
}
guard let result = result else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public class GoogleDriveCloudProvider: CloudProvider {
CloudAccessDDLogDebug("GoogleDriveCloudProvider: executeQuery(\(query.requestID)) failed with error: \(error)")
if error.domain == NSURLErrorDomain, error.code == NSURLErrorNotConnectedToInternet || error.code == NSURLErrorCannotConnectToHost || error.code == NSURLErrorNetworkConnectionLost || error.code == NSURLErrorDNSLookupFailed || error.code == NSURLErrorResourceUnavailable || error.code == NSURLErrorInternationalRoamingOff {
reject(CloudProviderError.noInternetConnection)
} else if ((error.domain == kGTLRErrorObjectDomain && (error.code == 401 || error.code == 403)) || (error.domain == OIDOAuthTokenErrorDomain && error.code == OIDErrorCodeOAuth.invalidGrant.rawValue)) {
} else if (error.domain == kGTLRErrorObjectDomain && (error.code == 401 || error.code == 403)) || (error.domain == OIDOAuthTokenErrorDomain && error.code == OIDErrorCodeOAuth.invalidGrant.rawValue) {
reject(CloudProviderError.unauthorized)
} else if error.domain == kGTLRErrorObjectDomain, error.code == 404 {
reject(CloudProviderError.itemNotFound)
Expand Down

0 comments on commit e1ed0b1

Please sign in to comment.