Skip to content

Commit d1b9685

Browse files
committed
fix warnings
1 parent 1d196d5 commit d1b9685

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignOut/InitiateSignOut.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ struct InitiateSignOut: Action {
4040
let data = try await credentialStoreClient?.fetchData(
4141
type: .amplifyCredentials
4242
)
43-
guard case .amplifyCredentials(var credentials) = data else {
43+
guard case .amplifyCredentials(let credentials) = data else {
4444
return signedInData
4545
}
4646

4747
// Update SignedInData based on credential type
4848
switch credentials {
49-
case .userPoolOnly(var updatedSignedInData):
49+
case .userPoolOnly(let updatedSignedInData):
5050
return updatedSignedInData
51-
case .userPoolAndIdentityPool(var updatedSignedInData, _, _):
51+
case .userPoolAndIdentityPool(let updatedSignedInData, _, _):
5252
return updatedSignedInData
5353
case .identityPoolOnly, .identityPoolWithFederation, .noCredentials:
5454
return signedInData

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignOut/ShowHostedUISignOut.swift

+2-4
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,15 @@ class ShowHostedUISignOut: NSObject, Action {
4646
inPrivate: false,
4747
presentationAnchor: signOutEvent.presentationAnchor)
4848
await sendEvent(with: nil, dispatcher: dispatcher, environment: environment)
49-
}
50-
catch HostedUIError.cancelled {
49+
} catch HostedUIError.cancelled {
5150
if signInData.isRefreshTokenExpired == true {
5251
self.logVerbose("\(#fileID) Received user cancelled error, but session is expired and continue signing out.", environment: environment)
5352
await sendEvent(with: nil, dispatcher: dispatcher, environment: environment)
5453
} else {
5554
self.logVerbose("\(#fileID) Received error \(HostedUIError.cancelled)", environment: environment)
5655
await sendEvent(with: HostedUIError.cancelled, dispatcher: dispatcher, environment: environment)
5756
}
58-
}
59-
catch {
57+
} catch {
6058
self.logVerbose("\(#fileID) Received error \(error)", environment: environment)
6159
await sendEvent(with: error, dispatcher: dispatcher, environment: environment)
6260
}

0 commit comments

Comments
 (0)