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

feat: add SubscriptionSink::pipe_from_try_stream to support streams that returns Result #720

Merged
merged 8 commits into from
Apr 1, 2022

Commits on Mar 30, 2022

  1. refactor: make pipe_from_stream take stream of result

    The rationale for this is that it is more flexible for use cases when `Stream<Item = Result<T, Error>>`.
    
    Take for example `tokio_stream::Broadcast` then one would have to something like:
    
    ```rust
       let stream = BroadcastStream::new(rx).take_while(|r| future::ready(r.is_ok())).filter_map(|r| future::ready(r.ok()));
    ```
    
    Of course it's a bit awkward to return `Result` when the underlying stream can't fail but I think that's fair trade-off
    here.
    niklasad1 committed Mar 30, 2022
    Configuration menu
    Copy the full SHA
    763a031 View commit details
    Browse the repository at this point in the history
  2. Update core/src/server/rpc_module.rs

    Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
    niklasad1 and TarikGul committed Mar 30, 2022
    Configuration menu
    Copy the full SHA
    d0a5b0f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    51dd154 View commit details
    Browse the repository at this point in the history
  4. Merge remote-tracking branch 'origin/na-resultify-pipe-from-stream' i…

    …nto na-resultify-pipe-from-stream
    niklasad1 committed Mar 30, 2022
    Configuration menu
    Copy the full SHA
    ecb1e18 View commit details
    Browse the repository at this point in the history
  5. add a test

    niklasad1 committed Mar 30, 2022
    Configuration menu
    Copy the full SHA
    79cd97d View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2022

  1. Configuration menu
    Copy the full SHA
    72bfee0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f354d86 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e692287 View commit details
    Browse the repository at this point in the history