Просмотр исходного кода

Set `@Sendable` on refresh method in Authenticator (#3901)

### Goals :soccer:

After upgrading to version 5.10.0, the following error occurred, so I
tried to fix it with this PR.


![image](https://github.com/user-attachments/assets/861c79a7-28e2-4b98-a118-140453c31405)

### Environments

- Xcode: 16.0
- Swift: 6.0
- Strict Concurrency Checking: Complete
rono23 1 год назад
Родитель
Сommit
229b1a27b6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Source/Features/AuthenticationInterceptor.swift

+ 1 - 1
Source/Features/AuthenticationInterceptor.swift

@@ -81,7 +81,7 @@ public protocol Authenticator: AnyObject, Sendable {
     ///   - credential: The `Credential` to refresh.
     ///   - session:    The `Session` requiring the refresh.
     ///   - completion: The closure to be executed once the refresh is complete.
-    func refresh(_ credential: Credential, for session: Session, completion: @escaping (Result<Credential, any Error>) -> Void)
+    func refresh(_ credential: Credential, for session: Session, completion: @Sendable @escaping (Result<Credential, any Error>) -> Void)
 
     /// Determines whether the `URLRequest` failed due to an authentication error based on the `HTTPURLResponse`.
     ///