Removing unnecessary async/await

pmeunier
Jul 21, 2021, 12:50 PM
RUBBHYZ7MCLKJIHZ3EWEC3JR3FSKOU4T2NH7KRBG7ECAU4JF3LUAC

Dependencies

  • [2] LBVUI6AX Rename `ls` command to `list`
  • [3] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [4] LJFJEX43 Fixing newline issues in the protocol over OpenSSH
  • [5] 5OGOE4VW Store the current channel in the pristine
  • [6] W5HHTRPK Rename the `mv` command to `move`
  • [7] TZVUNELW Documentation comments
  • [8] B3QWIGDE Fixing the Git features with the latest Pijul (+ conflicts in Cargo.toml)
  • [9] JN34NIMJ More specific error for unrecognized subcommands
  • [10] I52XSRUH Massive cleanup, and simplification
  • [11] HMMMKONL Fixing alive vertices
  • [12] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [13] A3RM526Y Integrating identity malleability
  • [14] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [15] I24UEJQL Various post-fire fixes
  • [16] ZBNKSYA6 Fixing a bus error when starting a transaction on a full disk
  • [17] SQVWP4LU When clone fails, only remove directories we have created (not other directories)
  • [18] TFK7CYFQ `pijul channel new` to create new, empty channels
  • [19] 4H2XTVJ2 Fix some mistakes in the docs
  • [20] NS36CJCO Validating timestamps in record
  • [21] VQPAUKBQ channel switch as an alias to reset
  • [22] SNZ3OAMC use native external subcommand support instead of hand-rolled one
  • [23] YN63NUZO Sanakirja 1.0
  • [24] QL6K2ZM3 Tags
  • [25] LYTVEPH3 Avoid cloning into an existing path
  • [26] KWAMD2KR A few fixes in the documentation comments
  • [27] EEBKW7VT Keys and identities
  • [28] RG4YZPKL file_operations: remove the counter-intuitive --repository options
  • [29] AEPEFS7O Write help for each argument
  • [30] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [31] 3FTEGCMR add timestamp_validator to tag --timestamp option
  • [32] YDKNUL6B Add `diff --short` that lists changes without showing them
  • [33] R3H7D42U Debugging `pijul git`: proper error reporting
  • [34] JG3MWHEN commands/change: help messages
  • [35] RGJWLQWB When cloning, try to init *before* setting up the path Drop (pijul::commands::clone::RepoPath)

Change contents

  • replacement in pijul/src/repository.rs at line 82
    [5.24299][5.1624:1713]()
    pub async fn init(path: Option<std::path::PathBuf>) -> Result<Self, anyhow::Error> {
    [5.24299]
    [5.24382]
    pub fn init(path: Option<std::path::PathBuf>) -> Result<Self, anyhow::Error> {
  • replacement in pijul/src/main.rs at line 196
    [5.88438][5.4608:4705]()
    SubCommand::Log(l) => l.run().await,
    SubCommand::Init(init) => init.run().await,
    [5.88438]
    [5.88523]
    SubCommand::Log(l) => l.run(),
    SubCommand::Init(init) => init.run(),
  • replacement in pijul/src/main.rs at line 199
    [5.88578][5.88578:88636]()
    SubCommand::Record(record) => record.run().await,
    [5.88578]
    [4.231]
    SubCommand::Record(record) => record.run(),
  • replacement in pijul/src/main.rs at line 203
    [5.88786][5.4759:4942]()
    SubCommand::Change(change) => change.run().await,
    SubCommand::Channel(channel) => channel.run().await,
    SubCommand::Protocol(protocol) => protocol.run().await,
    [5.88786]
    [5.88951]
    SubCommand::Change(change) => change.run(),
    SubCommand::Channel(channel) => channel.run(),
    SubCommand::Protocol(protocol) => protocol.run(),
  • replacement in pijul/src/main.rs at line 207
    [5.88983][5.4943:4992](),[5.4992][5.17:77](),[5.77][2.17:69](),[2.69][5.5084:5246](),[5.5084][5.5084:5246]()
    SubCommand::Git(git) => git.run().await,
    SubCommand::Move(move_cmd) => move_cmd.run().await,
    SubCommand::List(list) => list.run().await,
    SubCommand::Add(add) => add.run().await,
    SubCommand::Remove(remove) => remove.run().await,
    SubCommand::Reset(reset) => reset.run().await,
    [5.88983]
    [5.1628]
    SubCommand::Git(git) => git.run(),
    SubCommand::Move(move_cmd) => move_cmd.run(),
    SubCommand::List(list) => list.run(),
    SubCommand::Add(add) => add.run(),
    SubCommand::Remove(remove) => remove.run(),
    SubCommand::Reset(reset) => reset.run(),
  • replacement in pijul/src/main.rs at line 214
    [5.1664][5.5247:5531](),[5.89283][5.5247:5531]()
    SubCommand::Debug(debug) => debug.run().await,
    SubCommand::Fork(fork) => fork.run().await,
    SubCommand::Unrecord(unrecord) => unrecord.run().await,
    SubCommand::Apply(apply) => apply.run().await,
    SubCommand::Remote(remote) => remote.run().await,
    [5.1664]
    [5.89537]
    SubCommand::Debug(debug) => debug.run(),
    SubCommand::Fork(fork) => fork.run(),
    SubCommand::Unrecord(unrecord) => unrecord.run(),
    SubCommand::Apply(apply) => apply.run(),
    SubCommand::Remote(remote) => remote.run(),
  • replacement in pijul/src/main.rs at line 220
    [5.89598][5.5532:5590](),[5.5590][5.15:64]()
    SubCommand::Credit(credit) => credit.run().await,
    SubCommand::Tag(tag) => tag.run().await,
    [5.89598]
    [5.39]
    SubCommand::Credit(credit) => credit.run(),
    SubCommand::Tag(tag) => tag.run(),
  • replacement in pijul/src/commands/unrecord.rs at line 34
    [5.96125][5.5664:5722]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.96125]
    [5.13337]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/tag.rs at line 51
    [5.1480][5.1480:1538]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.1480]
    [5.1538]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/reset.rs at line 30
    [5.98112][5.5828:5917]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    self.reset(true).await
    [5.98112]
    [5.472]
    pub fn run(self) -> Result<(), anyhow::Error> {
    self.reset(true)
  • replacement in pijul/src/commands/reset.rs at line 34
    [5.479][5.5918:6011]()
    pub async fn switch(self) -> Result<(), anyhow::Error> {
    self.reset(false).await
    [5.479]
    [5.560]
    pub fn switch(self) -> Result<(), anyhow::Error> {
    self.reset(false)
  • replacement in pijul/src/commands/reset.rs at line 38
    [5.567][5.6012:6093]()
    async fn reset(self, overwrite_changes: bool) -> Result<(), anyhow::Error> {
    [5.567]
    [5.98164]
    fn reset(self, overwrite_changes: bool) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/record.rs at line 62
    [5.102774][5.102774:102832]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.102774]
    [5.13911]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/pushpull.rs at line 36
    [5.112203][5.6414:6472]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.112203]
    [5.14593]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/protocol.rs at line 51
    [5.124762][5.6802:6860]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.124762]
    [5.15774]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • edit in pijul/src/commands/log.rs at line 30
    [5.134881]
    [5.134881]
    /// Start after this many changes
    #[clap(long = "offset")]
    offset: Option<usize>,
    /// Output at most this many changes
    #[clap(long = "limit")]
    limit: Option<usize>,
  • replacement in pijul/src/commands/log.rs at line 39
    [5.134895][5.7025:7083]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.134895]
    [5.21049]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/init.rs at line 18
    [5.136770][5.14081:14139](),[5.14139][5.2634:2689]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    let repo = Repository::init(self.path).await?;
    [5.136770]
    [5.512]
    pub fn run(self) -> Result<(), anyhow::Error> {
    let repo = Repository::init(self.path)?;
  • replacement in pijul/src/commands/fork.rs at line 25
    [5.168309][5.14570:14628]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.168309]
    [5.23679]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/file_operations.rs at line 23
    [5.109][5.14734:14796](),[5.169351][5.14734:14796]()
    pub async fn run(mut self) -> Result<(), anyhow::Error> {
    [5.109]
    [5.0]
    pub fn run(mut self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/file_operations.rs at line 94
    [2.101][5.14910:14968](),[5.170860][5.14910:14968]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [2.101]
    [5.23807]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/file_operations.rs at line 119
    [5.171335][5.15055:15113]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.171335]
    [5.356]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/file_operations.rs at line 178
    [5.172614][5.15227:15285]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.172614]
    [5.406]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/diff.rs at line 38
    [5.174051][5.15399:15461]()
    pub async fn run(mut self) -> Result<(), anyhow::Error> {
    [5.174051]
    [5.24003]
    pub fn run(mut self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/debug.rs at line 20
    [5.178019][5.15539:15597]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.178019]
    [5.24133]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/credit.rs at line 26
    [5.179133][5.15663:15721]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.179133]
    [5.179185]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/clone.rs at line 75
    [5.167][5.15813:15873]()
    let mut repo = Repository::init(Some(path)).await?;
    [5.167]
    [3.16742]
    let mut repo = Repository::init(Some(path))?;
  • replacement in pijul/src/commands/channel.rs at line 38
    [5.187383][5.15910:15968]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.187383]
    [5.187494]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/channel.rs at line 75
    [5.6398][5.16165:16216]()
    .switch()
    .await?;
    [5.6398]
    [5.1727]
    .switch()?;
  • replacement in pijul/src/commands/change.rs at line 21
    [5.189681][5.16339:16397]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.189681]
    [5.24784]
    pub fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/apply.rs at line 29
    [5.194761][5.16573:16631]()
    pub async fn run(self) -> Result<(), anyhow::Error> {
    [5.194761]
    [5.24950]
    pub fn run(self) -> Result<(), anyhow::Error> {