Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaraccini committed Sep 13, 2017
1 parent 11ba210 commit b416633
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/JSONDecodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ internal extension JSON {
static func getArray(from json: JSON) throws -> [JSON] {
// Ideally should be expressed as a conditional protocol implementation on Swift.Array.
guard case let .array(array) = json else {
throw Error.valueNotConvertible(value: json, to: Swift.Array<JSON>)
throw Error.valueNotConvertible(value: json, to: Swift.Array<JSON>.self)
}
return array
}
Expand All @@ -147,7 +147,7 @@ internal extension JSON {
static func getDictionary(from json: JSON) throws -> [String: JSON] {
// Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary.
guard case let .dictionary(dictionary) = json else {
throw Error.valueNotConvertible(value: json, to: Swift.Dictionary<String, JSON>)
throw Error.valueNotConvertible(value: json, to: Swift.Dictionary<String, JSON>.self)
}
return dictionary
}
Expand All @@ -174,7 +174,7 @@ internal extension JSON {
/// - seealso: `JSON.decode(_:type:)`
static func decodedDictionary<Decoded: JSONDecodable>(from json: JSON) throws -> [Swift.String: Decoded] {
guard case let .dictionary(dictionary) = json else {
throw Error.valueNotConvertible(value: json, to: Swift.Dictionary<String, Decoded>)
throw Error.valueNotConvertible(value: json, to: Swift.Dictionary<String, Decoded>.self)
}
var decodedDictionary = Swift.Dictionary<String, Decoded>(minimumCapacity: dictionary.count)
for (key, value) in dictionary {
Expand Down

0 comments on commit b416633

Please sign in to comment.