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 publisher function, accepting array of keys #148

Merged
merged 9 commits into from
Sep 3, 2023

Commits on Sep 2, 2023

  1. Fixes infinite recursion when casting AnySerializable to wrong type

    If a values associated type `Serializable` , equals the values type, `toValue` would infinitely call itself.
    
    The test `testWrongCast` reproduces this and I fixed it by comparing the `nextType` with the current type.
    leoMehlig committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    403672a View commit details
    Browse the repository at this point in the history
  2. Fix indentation

    leoMehlig committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    4c10fc0 View commit details
    Browse the repository at this point in the history
  3. Remove spaces line

    leoMehlig committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    1185c4e View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2023

  1. Configuration menu
    Copy the full SHA
    6aff5ad View commit details
    Browse the repository at this point in the history
  2. Adds publisher function accepting array of keys

    In my app I have a use case, where I have a dynamic array of keys, which I want to observe using a Publisher (a publisher works better here then AsyncSequence). By giving an option to use either variadic parameters or an array, that would be possible without breaking any code.
    
    Additionally, I've discovered a crash when observing multiple keys and immediately cancelling the publisher. Here an observer, which was not yet added, was removed. Added check to make sure, this can't happen.
    leoMehlig committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    7cfd340 View commit details
    Browse the repository at this point in the history
  3. Fix indentation

    leoMehlig committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    8b256c1 View commit details
    Browse the repository at this point in the history
  4. Update Sources/Defaults/Observation.swift

    Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
    leoMehlig and sindresorhus authored Sep 3, 2023
    Configuration menu
    Copy the full SHA
    704167f View commit details
    Browse the repository at this point in the history
  5. Update Sources/Defaults/Observation.swift

    Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
    leoMehlig and sindresorhus authored Sep 3, 2023
    Configuration menu
    Copy the full SHA
    b825df8 View commit details
    Browse the repository at this point in the history
  6. Update Sources/Defaults/Observation+Combine.swift

    Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
    leoMehlig and sindresorhus authored Sep 3, 2023
    Configuration menu
    Copy the full SHA
    a44434e View commit details
    Browse the repository at this point in the history