fix stack overflow error on RawRepresentable encoding

This commit is contained in:
Hedden, Kyle Matthew 2023-10-26 16:39:30 -04:00
parent 58afcc596d
commit 1eb0103744

View File

@ -32,9 +32,4 @@ extension RawRepresentableCodable {
throw RawRepresentableCodableError.invalid(value: "\(rawValue)")
}
}
public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
try container.encode(self)
}
}