Skip to content

Commit 669ad43

Browse files
author
Sebastien Stormacq
committed
use String(decoding:) instead of String(data:)
1 parent 6138790 commit 669ad43

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Tests/AWSLambdaRuntimeTests/LambdaLocalServerTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,10 @@ extension LambdaRuntimeTests {
135135
port: customPort,
136136
payload: "\"World\(i)\""
137137
)
138-
let responseBody = String(data: data, encoding: .utf8) ?? ""
139138
return RequestResult(
140139
requestIndex: i,
141140
statusCode: response.statusCode,
142-
responseBody: responseBody
141+
responseBody: String(decoding: data, as: UTF8.self)
143142
)
144143
}
145144
}

0 commit comments

Comments
 (0)