Skip to content

Commit

Permalink
Fixes build for Xcode 10.1 and Swift 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
xzeror committed Apr 3, 2019
1 parent 1fe6790 commit bc500e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Nimble/Matchers/BeResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Foundation
///
/// You can pass a closure to do any arbitrary custom matching
/// to the value inside result. The closure only gets called when result is success.
#if swift(>=5)
@available(swift 5)
public func beSuccess<T>(test: ((T) -> Void)? = nil) -> Predicate<Result<T, Error>> {
return Predicate.define("be <success>") { expression, message in
Expand Down Expand Up @@ -33,3 +34,4 @@ public func beFailure<T>(test: ((Error) -> Void)? = nil) -> Predicate<Result<T,
return PredicateResult(status: .matches, message: message)
}
}
#endif

0 comments on commit bc500e0

Please sign in to comment.