Closed michael-grunder closed 4 years ago
@michael-grunder Thanks for the contributions!
Are you sure #![feature(async_closure)]
is necessary to compile? I don't use it elsewhere in the code, and the tests seem to succeed without it. This feature is still unstable, and we should avoid unless necessary.
Thanks for the reply!
I pulled the code out into a separate project and switched them to normal async functions (as opposed to tests).
Looks like scoped_futures does need the directive, while test_scope_and_block does not.
I'm not sure on why though, since it sure looks like they're both using async closures, but I'm still pretty new to Rust (and especially async rust).
You can find the repo here.
Edit: If it's useful, I'm running 1.40.0 stable, and 1.42.0-nightly
Oh right! We should swap the order: use || async
instead of async ||
. The former is just a regular closure that returns a future and the latter is an async_closure. Could you make that change and remove the feature attributes?
Thanks!
Looks good to me. Thanks!
Just small changes to README.md so the examples compile outside of the crate.