Skip to content

Commit c6f8834

Browse files
author
Itai Ferber
committed
Remove unnecessary CodingKey implementation
1 parent 44682f7 commit c6f8834

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

stdlib/public/SDK/Foundation/Codable.swift

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,6 @@ extension Data : Codable {
3030
private enum CodingKeys : Int, CodingKey {
3131
case length
3232
case bytes
33-
34-
// TODO: Remove these when derived conformance is merged.
35-
var stringValue: String {
36-
switch self {
37-
case .length: return "length"
38-
case .bytes: return "bytes"
39-
}
40-
}
41-
42-
init?(stringValue: String) {
43-
switch stringValue {
44-
case "length": self = .length
45-
case "bytes": self = .bytes
46-
default: return nil
47-
}
48-
}
49-
50-
var intValue: Int? {
51-
return self.rawValue
52-
}
53-
54-
init?(intValue: Int) {
55-
switch intValue {
56-
case 0: self = .length
57-
case 1: self = .bytes
58-
default: return nil
59-
}
60-
}
6133
}
6234

6335
public init(from decoder: Decoder) throws {

0 commit comments

Comments
 (0)