Minor improvements to future::join!
's implementation by danielhenrymantilla · Pull Request #91721 · rust-lang/rust (original) (raw)
This is a follow-up from rust-lang#91645, regarding some remarks I made.
Mainly:
- it hides the recursive munching through a private
macro
, to avoid leaking such details (a corollary is getting rid of the need to use@
to disambiguate); - it uses a
match
binding, outside theasync move
block, to better match the semantics from function-like syntax; - it pre-pins the future before calling into
poll_fn
, sincepoll_fn
, alone, cannot guarantee that its capture does not move; - it uses
.ready()?
since it's such a neat pattern; - it renames
Took
toTaken
for consistency withDone
.