Skip to content

Commit 78fd601

Browse files
authored
fix: Remove unneeded capture from endpoint params block (#2027)
1 parent 1009575 commit 78fd601

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extension GetFooInput {
5050
builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions))
5151
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
5252
builder.applySigner(ClientRuntime.SignerMiddleware<GetFooOutput>())
53-
let endpointParamsBlock = { [config] (context: Smithy.Context) in
53+
let endpointParamsBlock = { (context: Smithy.Context) in
5454
EndpointParams()
5555
}
5656
builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware<GetFooOutput, EndpointParams>(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }))
@@ -121,7 +121,7 @@ extension PostFooInput {
121121
builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions))
122122
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
123123
builder.applySigner(ClientRuntime.SignerMiddleware<PostFooOutput>())
124-
let endpointParamsBlock = { [config] (context: Smithy.Context) in
124+
let endpointParamsBlock = { (context: Smithy.Context) in
125125
EndpointParams()
126126
}
127127
builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware<PostFooOutput, EndpointParams>(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }))
@@ -192,7 +192,7 @@ extension PutFooInput {
192192
builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions))
193193
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
194194
builder.applySigner(ClientRuntime.SignerMiddleware<PutFooOutput>())
195-
let endpointParamsBlock = { [config] (context: Smithy.Context) in
195+
let endpointParamsBlock = { (context: Smithy.Context) in
196196
EndpointParams()
197197
}
198198
builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware<PutFooOutput, EndpointParams>(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }))
@@ -265,7 +265,7 @@ extension PutObjectInput {
265265
builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions))
266266
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
267267
builder.applySigner(ClientRuntime.SignerMiddleware<PutObjectOutput>())
268-
let endpointParamsBlock = { [config] (context: Smithy.Context) in
268+
let endpointParamsBlock = { (context: Smithy.Context) in
269269
EndpointParams()
270270
}
271271
context.set(key: Smithy.AttributeKey<EndpointParams>(name: "EndpointParams"), value: endpointParamsBlock(context))

codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AWSQueryOperationStackTest {
3737
builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions))
3838
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
3939
builder.applySigner(ClientRuntime.SignerMiddleware<NoInputAndOutputOutput>())
40-
let endpointParamsBlock = { [config] (context: Smithy.Context) in
40+
let endpointParamsBlock = { (context: Smithy.Context) in
4141
EndpointParams()
4242
}
4343
builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware<NoInputAndOutputOutput, EndpointParams>(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }))

0 commit comments

Comments
 (0)