Adds Optional.publisher as a convenience for Optional.Publisher.init.#32
Adds Optional.publisher as a convenience for Optional.Publisher.init.#32freak4pc merged 1 commit intoCombineCommunity:masterfrom jasdev:optional-publisher
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
+ Coverage 97.60% 97.61% +0.01%
==========================================
Files 42 44 +2
Lines 2500 2520 +20
==========================================
+ Hits 2440 2460 +20
Misses 60 60
Continue to review full report at Codecov.
|
| receiveValue: { results.append($0) }) | ||
|
|
||
| XCTAssertTrue(results.isEmpty) | ||
| XCTAssertEqual(.finished, completion) |
There was a problem hiding this comment.
the docs mention this could end with an error, not sure if this is related to nullabiilty or just something confusing about the docs. I imagine it's just gonna compete without anything if it's nil?
There was a problem hiding this comment.
Optional.Publisher.Failure is Never, so it can’t error. 😄
https://developer.apple.com/documentation/swift/optional/publisher/failure
There was a problem hiding this comment.
So the docs here are wrong, funny:
https://developer.apple.com/documentation/swift/optional/publisher/3343960-init
|
|
||
| cancellable = subject | ||
| .prefix(duration: 0.5) | ||
| .prefix(duration: 0.8) |
freak4pc
left a comment
There was a problem hiding this comment.
Quick final notes before merge. Looks great!
| receiveValue: { results.append($0) }) | ||
|
|
||
| XCTAssertTrue(results.isEmpty) | ||
| XCTAssertEqual(.finished, completion) |
There was a problem hiding this comment.
So the docs here are wrong, funny:
https://developer.apple.com/documentation/swift/optional/publisher/3343960-init
|
Resolved and merging since releasing today :) |
|
Bless, thank you for carrying this over the merge line! 🙏🏽 |

No description provided.