diff --git a/CHANGELOG.md b/CHANGELOG.md index 750e20cb..132927b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # OHHTTPStubs — CHANGELOG +## Master + +* added `@discardableResult` to func stub for swift 3. + [@mrkite](https://github.com/mrkite), [#203](https://github.com/AliSoftware/OHHTTPStubs/pull/203) + ## [5.2.1](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/5.2.0) * Fix typos in README and documentation. diff --git a/OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift b/OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift index 147fda67..3ffdc964 100644 --- a/OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift +++ b/OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift @@ -84,6 +84,7 @@ public func fixture(filePath: String, status: Int32 = 200, headers: [NSObject: A * and can be later used to remove it with `removeStub:` */ #if swift(>=3.0) +@discardableResult public func stub(condition: @escaping OHHTTPStubsTestBlock, response: @escaping OHHTTPStubsResponseBlock) -> OHHTTPStubsDescriptor { return OHHTTPStubs.stubRequests(passingTest: condition, withStubResponse: response) }