Skip to content

Commit 6d916b1

Browse files
committed
Build dynamic framework with SwiftPM
1 parent ae79b25 commit 6d916b1

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

Package.swift

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
// swift-tools-version:5.0
22
import PackageDescription
33

4-
let package = Package(name: "TLVCoding",
5-
products: [
6-
.library(
7-
name: "TLVCoding",
8-
targets: ["TLVCoding"]
9-
)
10-
],
11-
targets: [
12-
.target(name: "TLVCoding", path: "./Sources"),
13-
.testTarget(name: "TLVCodingTests", dependencies: ["TLVCoding"])
14-
],
15-
swiftLanguageVersions: [.v5])
4+
let package = Package(
5+
name: "TLVCoding",
6+
products: [
7+
.library(
8+
name: "TLVCoding",
9+
type: .dynamic,
10+
targets: ["TLVCoding"]
11+
)
12+
],
13+
targets: [
14+
.target(name: "TLVCoding", path: "./Sources"),
15+
.testTarget(name: "TLVCodingTests", dependencies: ["TLVCoding"])
16+
],
17+
swiftLanguageVersions: [.v5]
18+
)

Sources/Encoder.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public struct TLVEncoder {
4444
assert(encoder.stack.containers.count == 1)
4545

4646
guard case let .items(container) = encoder.stack.root else {
47-
4847
throw EncodingError.invalidValue(value, EncodingError.Context(codingPath: [], debugDescription: "Top-level \(T.self) is not encoded as items."))
4948
}
5049

@@ -277,7 +276,6 @@ internal extension TLVEncoder.Encoder {
277276
}
278277
}
279278

280-
281279
// MARK: - KeyedEncodingContainerProtocol
282280

283281
internal final class TLVKeyedContainer <K : CodingKey> : KeyedEncodingContainerProtocol {

0 commit comments

Comments
 (0)