From a0593e3aa9b19b9ca3c3881cbe0d9d207fe46d2c Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 26 Nov 2024 07:48:30 +0000 Subject: refactor: err msgs 'cannot' > 'failed to' in nearly all cases 'cannot' was used when an action was tried and failed. 'failed to' is strictly better because: * just because the action didn't work that time doesnt mean it cannot work * it is better at drawing the users attention to a problem --- src/bin/ngit/sub_commands/send.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin/ngit/sub_commands/send.rs') diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs index 114a021..1965875 100644 --- a/src/bin/ngit/sub_commands/send.rs +++ b/src/bin/ngit/sub_commands/send.rs @@ -45,7 +45,7 @@ pub struct SubCommandArgs { #[allow(clippy::too_many_lines)] pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Result<()> { - let git_repo = Repo::discover().context("cannot find a git repository")?; + let git_repo = Repo::discover().context("failed to find a git repository")?; let git_repo_path = git_repo.get_path()?; let (main_branch_name, main_tip) = git_repo @@ -83,7 +83,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re } else { git_repo .parse_starting_commits(&args.since_or_range) - .context("cannot parse specified starting commit or range")? + .context("failed to parse specified starting commit or range")? } }; -- cgit v1.2.3