Skip to content

Commit dacdcee

Browse files
authored
chore: Fix compiler warnings (#809)
1 parent 959000c commit dacdcee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Sources/SmithyHTTPAuth/SigV4Signer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class SigV4Signer: SmithyHTTPAuthAPI.Signer {
5252
)
5353
}
5454

55-
var signingConfig = try constructSigningConfig(identity: identity, signingProperties: signingProperties)
55+
let signingConfig = try constructSigningConfig(identity: identity, signingProperties: signingProperties)
5656

5757
let unsignedRequest = requestBuilder.build()
5858
let crtUnsignedRequest: HTTPRequestBase = isBidirectionalStreamingEnabled ?

Tests/SmithyRetriesTests/DefaultRetryStrategy/DefaultRetryStrategyTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class DefaultRetryStrategyTests: XCTestCase {
2828

2929
override func setUp() {
3030
backoffStrategy = .init()
31-
backoffStrategy.random = { 1.0 }
31+
backoffStrategy.random = { @Sendable () -> Double in 1.0 }
3232
options = RetryStrategyOptions(backoffStrategy: backoffStrategy, maxRetriesBase: 2)
3333
subject = DefaultRetryStrategy(options: options)
3434
mockSleeper = { self.actualDelay = $0 }

Tests/SmithyRetriesTests/DefaultRetryStrategy/ExponentialBackoffStrategyTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ final class ExponentialBackoffStrategyTests: XCTestCase {
1616
override func setUp() {
1717
subject = ExponentialBackoffStrategy()
1818
// Randomization is disabled to allow easy, repeatable verification of basic behavior.
19-
subject.random = { 1.0 }
19+
subject.random = { @Sendable () -> Double in 1.0 }
2020
}
2121

2222
func test_backoffStrategy_multipliesByBackoffFactor() {
23-
subject.random = { 0.25 }
23+
subject.random = { @Sendable () -> Double in 0.25 }
2424
XCTAssertEqual(subject.computeNextBackoffDelay(attempt: 0), 0.25)
25-
subject.random = { 0.5 }
25+
subject.random = { @Sendable () -> Double in 0.5 }
2626
XCTAssertEqual(subject.computeNextBackoffDelay(attempt: 0), 0.5)
27-
subject.random = { 0.75 }
27+
subject.random = { @Sendable () -> Double in 0.75 }
2828
XCTAssertEqual(subject.computeNextBackoffDelay(attempt: 0), 0.75)
2929
}
3030

0 commit comments

Comments
 (0)