Skip to content

Commit a3c3b51

Browse files
author
Joe Newton
committed
Fixed reference to JSON in Decodable protocol method (Decodable is coding-agnostic)
1 parent 4bba407 commit a3c3b51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Half/Half+Coding.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extension Half: Codable {
1717
let float = try container.decode(Float.self)
1818

1919
guard float.isInfinite || float.isNaN || abs(float) <= Float(Half.greatestFiniteMagnitude) else {
20-
throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: container.codingPath, debugDescription: "Parsed JSON number \(float) does not fit in \(type(of: self))."))
20+
throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: container.codingPath, debugDescription: "Parsed number \(float) does not fit in \(type(of: self))."))
2121
}
2222

2323
self.init(float)

0 commit comments

Comments
 (0)