Skip to content

Commit 5eebc52

Browse files
committed
Remove mutating keyword from write(_:)
1 parent 3bcc17a commit 5eebc52

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/AWSLambdaRuntimeCore/LambdaRuntimeClientProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import NIOCore
1616

1717
package protocol LambdaRuntimeClientResponseStreamWriter: LambdaResponseStreamWriter {
18-
mutating func write(_ buffer: ByteBuffer) async throws
18+
func write(_ buffer: ByteBuffer) async throws
1919
func finish() async throws
2020
func writeAndFinish(_ buffer: ByteBuffer) async throws
2121
func reportError(_ error: any Error) async throws

Sources/AWSLambdaRuntimeCore/NewLambdaHandlers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ package protocol StreamingLambdaHandler {
4848
package protocol LambdaResponseStreamWriter {
4949
/// Write a response part into the stream. Bytes written are streamed continually.
5050
/// - Parameter buffer: The buffer to write.
51-
mutating func write(_ buffer: ByteBuffer) async throws
51+
func write(_ buffer: ByteBuffer) async throws
5252

5353
/// End the response stream and the underlying HTTP response.
5454
func finish() async throws

Tests/AWSLambdaRuntimeCoreTests/LambdaMockClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct LambdaMockWriter: LambdaRuntimeClientResponseStreamWriter {
2424
self.underlying = underlying
2525
}
2626

27-
mutating func write(_ buffer: ByteBuffer) async throws {
27+
func write(_ buffer: ByteBuffer) async throws {
2828
try await self.underlying.write(buffer)
2929
}
3030

0 commit comments

Comments
 (0)