Skip to content

Commit

Permalink
Fix swift warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlocke committed Oct 2, 2024
1 parent d1cacdd commit 15cb68c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stone/backends/swift_rsrc/SwiftObjcShimHelpers.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private func callErrorToDB(error: DBXCallError?) -> DBRequestError? {
}
}()
return DBAUTHAccessError(noPermission: noPermissionError)
} else if let error = error.error.asPpAccessDenied {
} else if error.error.asPpAccessDenied != nil {
return DBAUTHAccessError(ppAccessDenied: ())
} else {
return DBAUTHAccessError(other: ())
Expand All @@ -185,10 +185,10 @@ private func callErrorToDB(error: DBXCallError?) -> DBRequestError? {
if let lum = error.localizedUserMessage {
localizedUserMessage = DBLocalizedUserMessage(text: lum.text, locale: lum.locale)
}
var reason: DBAUTHRateLimitReason = {
if let error = error.error.reason.asTooManyRequests {
let reason: DBAUTHRateLimitReason = {
if error.error.reason.asTooManyRequests != nil {
DBAUTHRateLimitReason(tooManyRequests: ())
} else if let error = error.error.reason.asTooManyWriteOperations {
} else if error.error.reason.asTooManyWriteOperations != nil {
DBAUTHRateLimitReason(tooManyWriteOperations: ())
} else {
DBAUTHRateLimitReason(other: ())
Expand Down

0 comments on commit 15cb68c

Please sign in to comment.