diff --git a/README.md b/README.md index d19692b7..3c9e0a5e 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,8 @@ Credentials will automatically be renewed (if expired) using the refresh token. > This method is thread-safe. ```swift -switch result { +credentialsManager.credentials { result in + switch result { case .success(let credentials): print("Obtained credentials: \(credentials)") case .failure(let error): diff --git a/V2_MIGRATION_GUIDE.md b/V2_MIGRATION_GUIDE.md index 94f1d478..9513ff1f 100644 --- a/V2_MIGRATION_GUIDE.md +++ b/V2_MIGRATION_GUIDE.md @@ -363,8 +363,8 @@ credentialsManager.credentials { error, credentials in ```swift credentialsManager.credentials { result in switch result { - case .success(let credentials): ... // credentials retrieved - case .failure(let error): handleError(error) + case .success(let credentials): ... // credentials retrieved + case .failure(let error): handleError(error) } } ```