Skip to content

Conversation

matthiasbeyer
Copy link

The wording of the documentation of the try_unfold() function was a bit misleading.

The function signature clearly states that the closure that must be provided to the function must return a TryFuture that yields an Option<(Item, T)>.
The wording of the related documentation indicated that the closure may return None or Some(TryFuture), which is wrong.

This patch fixes that wording.

The wording of the documentation of the `try_unfold()` function was a
bit misleading.

The function signature clearly states that the closure that must be
provided to the function must return a `TryFuture` that yields an
`Option<(Item, T)>`.
The wording of the related documentation indicated that the closure may
return `None` or `Some(TryFuture)`, which is wrong.

This patch fixes that wording.

Signed-off-by: Matthias Beyer <[email protected]>
@rustbot rustbot added A-stream Area: futures::stream S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2025
@matthiasbeyer
Copy link
Author

matthiasbeyer commented Oct 11, 2025

cargo doc workflow failure seems to be unrelated.


It might be debatable whether the docs should mention the wrapping Result<_, _> from the TryFuture.
I'm of course open to that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-stream Area: futures::stream S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants