This is an archive of the discontinued Mercurial Phabricator instance.

rust-chg: reimplement run_command operation as async function
ClosedPublic

Authored by yuja on Apr 16 2020, 8:30 AM.

Details

Summary

The crafted state machine is no longer needed thanks to async/await.
The state machine is basically rewritten as follows:

  • Ready(..) -> return ..
  • PollAgain(..) -> run .. and await
  • Err(..) -> return Err(..)

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

yuja created this revision.Apr 16 2020, 8:30 AM
Alphare accepted this revision.Apr 17 2020, 8:15 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.