-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Optional.publisher as a convenience for Optional.Publisher.init. #32
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the docs here are wrong, funny:
https://developer.apple.com/documentation/swift/optional/publisher/3343960-init
@@ -47,7 +47,7 @@ final class PrefixDurationTests: XCTestCase { | |||
var completions = [Subscribers.Completion<Never>]() | |||
|
|||
cancellable = subject | |||
.prefix(duration: 0.5) | |||
.prefix(duration: 0.8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick final notes before merge. Looks great!
receiveValue: { results.append($0) }) | ||
|
||
XCTAssertTrue(results.isEmpty) | ||
XCTAssertEqual(.finished, completion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.