sindresorhus / Defaults

💾 Swifty and modern UserDefaults
https://swiftpackageindex.com/sindresorhus/Defaults/documentation/defaults
MIT License
2.02k stars 121 forks source link

Support `.removeDuplicates()` for `Defaults.publisher` #60

Closed IuriiIaremenko closed 3 years ago

IuriiIaremenko commented 3 years ago

Support removeDuplicates() combine operator for Defaults publishers #43

    Defaults
       .publisher(key, options: [])
       .removeDuplicates()

IssueHunt Summary ### Referenced issues This pull request has been submitted to: - [#43: Add `removeDuplicates` option to `Defaults.publisher(keys...)` and `Defaults.publisherAll()`](https://issuehunt.io/repos/129132562/issues/43) ---
IuriiIaremenko commented 3 years ago

@sindresorhus please review. Failing test case is not related to the change

/Users/runner/work/Defaults/Defaults/Tests/DefaultsTests/DefaultsTests.swift:607: error: -[DefaultsTests.DefaultsTests testObservePreventPropagationMultipleThreads] : Asynchronous wait failed: Exceeded timeout of 10 seconds, with unfulfilled expectations: "No infinite recursion".
IuriiIaremenko commented 3 years ago

@sindresorhus do you have a spare minute to review the PR?