Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit afcb9ba

Browse files
Avoid unwrapping httpClient
1 parent 2e57576 commit afcb9ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Examples/S3Test/Sources/S3Test/main.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ let logger = Logger(label: "AWS.Lambda.S3Test")
3636

3737
var s3: S3!
3838

39-
let awsClient: AWSHTTPClient = httpClient as! AWSHTTPClient
39+
guard let awsClient: AWSHTTPClient = httpClient as? AWSHTTPClient else {
40+
preconditionFailure()
41+
}
4042

4143
if ProcessInfo.processInfo.environment["LAMB_CI_EXEC"] == "1" {
4244
//Used for local test

0 commit comments

Comments
 (0)