From dc94ec40474deeea1cecb204e40dca6c2890fa31 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Thu, 19 Sep 2024 07:11:35 +0100 Subject: [PATCH] Swift 6 CI plus warning fixes --- .github/workflows/api-breakage.yml | 2 +- .github/workflows/ci.yml | 2 +- .../Extensions/DynamoDB/DynamoDBEncoder.swift | 34 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/api-breakage.yml b/.github/workflows/api-breakage.yml index 782db391e3..d2b7195593 100644 --- a/.github/workflows/api-breakage.yml +++ b/.github/workflows/api-breakage.yml @@ -8,7 +8,7 @@ jobs: linux: runs-on: ubuntu-latest container: - image: swift:5.10 + image: swift:latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cc9173b52..5552d721c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,9 +35,9 @@ jobs: strategy: matrix: image: - - swift:5.8 - swift:5.9 - swift:5.10 + - swift:6.0 services: localstack: image: localstack/localstack diff --git a/Sources/Soto/Extensions/DynamoDB/DynamoDBEncoder.swift b/Sources/Soto/Extensions/DynamoDB/DynamoDBEncoder.swift index 60c323bfca..77ff52eea5 100644 --- a/Sources/Soto/Extensions/DynamoDB/DynamoDBEncoder.swift +++ b/Sources/Soto/Extensions/DynamoDB/DynamoDBEncoder.swift @@ -382,73 +382,73 @@ class _DynamoDBEncoder: Encoder { } extension _DynamoDBEncoder: SingleValueEncodingContainer { - func encode(_ attribute: DynamoDB.AttributeValue) { + func encode(attribute: DynamoDB.AttributeValue) { self.storage.pushSingleValueContainer(attribute) } func encodeNil() throws { - self.encode(.null(true)) + self.encode(attribute: .null(true)) } func encode(_ value: Bool) throws { - self.encode(.bool(value)) + self.encode(attribute: .bool(value)) } func encode(_ value: String) throws { - self.encode(.s(value)) + self.encode(attribute: .s(value)) } func encode(_ value: Double) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: Float) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: Int) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: Int8) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: Int16) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: Int32) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: Int64) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: UInt) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: UInt8) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: UInt16) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: UInt32) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: UInt64) throws { - self.encode(.n(value.description)) + self.encode(attribute: .n(value.description)) } func encode(_ value: some Encodable) throws { let attribute = try box(value) - self.encode(attribute) + self.encode(attribute: attribute) } }