Skip to content

Commit ba09e4e

Browse files
committed
use Sendable instead of unchecked
1 parent 6f7576d commit ba09e4e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSMessageSigner.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import struct Smithy.Attributes
1515
import struct Smithy.AttributeKey
1616

1717
/// Signs a `Message` using the AWS SigV4 signing algorithm
18-
public class AWSMessageSigner: MessageSigner, @unchecked Sendable {
18+
public actor AWSMessageSigner: MessageSigner {
1919
let encoder: MessageEncoder
20-
let signer: () async throws -> MessageDataSigner
21-
let signingConfig: () async throws -> AWSSigningConfig
22-
let requestSignature: () -> String
20+
let signer: @Sendable () async throws -> MessageDataSigner
21+
let signingConfig: @Sendable () async throws -> AWSSigningConfig
22+
let requestSignature: @Sendable () -> String
2323
// Attribute key used to save AWSSigningConfig into signingProperties argument
2424
// for AWSSigV4Signer::signEvent call that conforms to Signer::signEvent.
2525
static let signingConfigKey = AttributeKey<AWSSigningConfig>(name: "EventStreamSigningConfig")
@@ -45,9 +45,9 @@ public class AWSMessageSigner: MessageSigner, @unchecked Sendable {
4545
}
4646

4747
public init(encoder: MessageEncoder,
48-
signer: @escaping () async throws -> MessageDataSigner,
49-
signingConfig: @escaping () async throws -> AWSSigningConfig,
50-
requestSignature: @escaping () -> String) {
48+
signer: @escaping @Sendable () async throws -> MessageDataSigner,
49+
signingConfig: @escaping @Sendable () async throws -> AWSSigningConfig,
50+
requestSignature: @escaping @Sendable () -> String) {
5151
self.encoder = encoder
5252
self.signer = signer
5353
self.signingConfig = signingConfig

Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/AWSSigV4Signer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import struct Foundation.TimeInterval
3232
import struct Foundation.URL
3333
import AWSSDKChecksums
3434

35-
public class AWSSigV4Signer: SmithyHTTPAuthAPI.Signer, @unchecked Sendable {
35+
public final class AWSSigV4Signer: SmithyHTTPAuthAPI.Signer, Sendable {
3636

3737
public init() {}
3838

0 commit comments

Comments
 (0)