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

Implementing from_fn #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

justin1dennison
Copy link

I have started working on the from_fn free function. However, I may need a little guidance in the implementation. I tried to smoke test the function, but was not able to get the smoke test to ever complete.

src/from_fn.rs Outdated
// let mut output = vec![];

// let mut stream = crate::from_fn(|| async move {
// Some(1u8)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your f must return None eventually, otherwise it will not terminate. See the example here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Thegaram. I don't know what I was thinking.

@justin1dennison justin1dennison changed the title [WIP] Implementing from_fn Implementing from_fn Mar 23, 2020
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.

2 participants