Skip to content

Commit ec25bff

Browse files
committed
func castOrFail<T>(any: Any) throws -> T now just works with Swift 2.2 or later
1 parent eb163af commit ec25bff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Casting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal func castOrFail<T>(e: Extractor) throws -> T {
1010
return try castOrFail(e.rawValue)
1111
}
1212

13-
public func castOrFail<T>(any: Any?) throws -> T {
13+
public func castOrFail<T>(any: Any) throws -> T {
1414
guard let result = any as? T else {
1515
throw typeMismatch("\(T.self)", actual: any, keyPath: nil)
1616
}

0 commit comments

Comments
 (0)