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 flatten util #120

Closed
wants to merge 1 commit into from
Closed

feat: Add flatten util #120

wants to merge 1 commit into from

Conversation

rklaehn
Copy link
Collaborator

@rklaehn rklaehn commented Nov 19, 2024

I use it all the time to flatten streams, so why not.

in iroh-blobs:

    /// List all complete blobs.
    pub async fn list(&self) -> Result<impl Stream<Item = Result<BlobInfo>>> {
        let stream = self.rpc.server_streaming(ListRequest).await?;
        Ok(flatten(stream))
    }

    /// List all incomplete (partial) blobs.
    pub async fn list_incomplete(&self) -> Result<impl Stream<Item = Result<IncompleteBlobInfo>>> {
        let stream = self.rpc.server_streaming(ListIncompleteRequest).await?;
        Ok(flatten(stream))
    }
    ```

in iroh-docs 3x, 

@rklaehn rklaehn changed the title Add flatten util feat: Add flatten util Nov 19, 2024
@rklaehn
Copy link
Collaborator Author

rklaehn commented Dec 10, 2024

Not worth it I think.

@rklaehn rklaehn closed this Dec 10, 2024
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.

1 participant