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

Minor improvements to future::join!'s implementation #91721

Merged
merged 6 commits into from
Dec 11, 2021

Commits on Dec 9, 2021

  1. Minor improvements to future::join!'s implementation

    This is a follow-up from rust-lang#91645, regarding [some remarks I made](https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/join!/near/264293660).
    
    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_ the `async move` block, to better match the semantics from function-like syntax;
      - it pre-pins the future before calling into `poll_fn`, since `poll_fn`, alone, cannot guarantee that its capture does not move;
      - it uses `.ready()?` since it's such a neat pattern;
      - it renames `Took` to `Taken` for consistency with `Done`.
    danielhenrymantilla committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    e936071 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    846cb9c View commit details
    Browse the repository at this point in the history
  3. Bring back the colon separators for the macro munching.

    Co-Authored-By: Ibraheem Ahmed <ibrah1440@gmail.com>
    danielhenrymantilla and ibraheemdev committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    07bcf4a View commit details
    Browse the repository at this point in the history
  4. Fix missing mut typo

    Co-authored-by: Ibraheem Ahmed <ibrah1440@gmail.com>
    danielhenrymantilla and ibraheemdev authored Dec 9, 2021
    Configuration menu
    Copy the full SHA
    e277a98 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f8dc13d View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Update library/core/tests/future.rs

    Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
    joshtriplett and danielhenrymantilla authored Dec 10, 2021
    Configuration menu
    Copy the full SHA
    67ab53d View commit details
    Browse the repository at this point in the history