Skip to content

Commit 03f7972

Browse files
authored
Remove redundant Codable implementation from Tag. (#169)
The default synthesized implementation of `Codable` is equivalent to what we've manually implemented for `Tag`, so we can delete the manual implementation.
1 parent b5694ac commit 03f7972

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/Testing/Traits/Tag.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,7 @@ extension Tag: Equatable, Hashable, Comparable {
5656

5757
// MARK: - Codable, CodingKeyRepresentable
5858

59-
extension Tag: Codable, CodingKeyRepresentable {
60-
public func encode(to encoder: any Encoder) throws {
61-
try rawValue.encode(to: encoder)
62-
}
63-
64-
public init(from decoder: any Decoder) throws {
65-
try self.init(rawValue: String(from: decoder))
66-
}
67-
}
59+
extension Tag: Codable, CodingKeyRepresentable {}
6860

6961
// MARK: -
7062

0 commit comments

Comments
 (0)