Skip to content

Commit 44b5fcd

Browse files
committed
Make abort error non-optional
1 parent bb8d7f4 commit 44b5fcd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Retry/Retry.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Foundation
1717

1818
public enum Retry {
1919
public enum Error: Swift.Error {
20-
case abort(with: Swift.Error? = nil)
20+
case abort(with: Swift.Error)
2121
case retryLimitExceeded(lastError: Swift.Error? = nil)
2222
}
2323

Tests/RetryTests/RetryTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ final class RetryTests: XCTestCase {
8989
throw Retry.Error.abort(with: Error())
9090
}
9191
XCTFail("expected an error to be thrown")
92-
} catch let Retry.Error.abort(with: .some(error)) {
92+
} catch let Retry.Error.abort(with: error) {
9393
XCTAssertEqual("\(error)", "test error")
9494
} catch {
9595
XCTFail("unexpected error: \(error)")

0 commit comments

Comments
 (0)