diff options
| author | Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com> | 2021-12-09 19:27:27 +0100 |
|---|---|---|
| committer | Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com> | 2021-12-09 21:05:29 +0100 |
| commit | e936071fbf22e8fb48e7e473d35b01df453278e2 (patch) | |
| tree | bd515fb7360116fda9f0ba54d271219ab9c80812 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | 0b42deaccc2cbe17a68067aa5fdb76104369e1fd (diff) | |
| download | rust-e936071fbf22e8fb48e7e473d35b01df453278e2.tar.gz rust-e936071fbf22e8fb48e7e473d35b01df453278e2.zip | |
Minor improvements to `future::join!`'s implementation
This is a follow-up from #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`.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
