Skip to content

Commit 1f66768

Browse files
Merge pull request #2 from SomeRandomiOSDev/1.0.2
Fixed reference to JSON in Decodable protocol method (Decodable is coding-agnostic)
2 parents 4bba407 + 9430271 commit 1f66768

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Half.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "Half"
4-
s.version = "1.0.1"
4+
s.version = "1.0.2"
55
s.summary = "Swift Half-Precision Floating Point"
66
s.description = <<-DESC
77
A lightweight framework containing a Swift implementation for a half-precision floating point type for iOS, macOS, tvOS, and watchOS.

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)