Skip to content
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

Merged
merged 1 commit into from
May 17, 2020
Merged

Adds Optional.publisher as a convenience for Optional.Publisher.init. #32

merged 1 commit into from
May 17, 2020

Conversation

jasdev
Copy link
Member

@jasdev jasdev commented May 11, 2020

No description provided.

@codecov
Copy link

codecov bot commented May 11, 2020

Codecov Report

Merging #32 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
Sources/Convenience/Optional.swift 100.00% <100.00%> (ø)
Tests/OptionalTests.swift 100.00% <100.00%> (ø)
Tests/PrefixDurationTests.swift 97.59% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a74c55a...bc644b1. Read the comment docs.

receiveValue: { results.append($0) })

XCTAssertTrue(results.isEmpty)
XCTAssertEqual(.finished, completion)
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -47,7 +47,7 @@ final class PrefixDurationTests: XCTestCase {
var completions = [Subscribers.Completion<Never>]()

cancellable = subject
.prefix(duration: 0.5)
.prefix(duration: 0.8)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sneaky you

@jasdev jasdev requested a review from freak4pc May 16, 2020 18:39
Copy link
Member

@freak4pc freak4pc left a 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freak4pc
Copy link
Member

Resolved and merging since releasing today :)

@freak4pc freak4pc changed the title Adds Optional.publisher (note casing) as a convenience for Optional.Publisher.init. Adds Optional.publisher as a convenience for Optional.Publisher.init. May 17, 2020
@freak4pc freak4pc merged commit 31e611e into CombineCommunity:master May 17, 2020
@jasdev
Copy link
Member Author

jasdev commented May 17, 2020

Bless, thank you for carrying this over the merge line! 🙏🏽

@jasdev jasdev deleted the optional-publisher branch May 17, 2020 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants