HomePhabricator

rust-chg: reimplement run_command operation as async function

Authored by yuja.

Description

rust-chg: reimplement run_command operation as async function

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(..)

Differential Revision: https://phab.mercurial-scm.org/D8445