diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-26 07:48:30 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-26 12:26:47 +0000 |
| commit | a0593e3aa9b19b9ca3c3881cbe0d9d207fe46d2c (patch) | |
| tree | 3482e7c558eff09cc91604ad6ddcd02cf2c94699 /src/bin/ngit/sub_commands/fetch.rs | |
| parent | 1332c625b75fce616e06b415c99a068bc45c8210 (diff) | |
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
Diffstat (limited to 'src/bin/ngit/sub_commands/fetch.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/fetch.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/ngit/sub_commands/fetch.rs b/src/bin/ngit/sub_commands/fetch.rs index c69f1c5..dc548fd 100644 --- a/src/bin/ngit/sub_commands/fetch.rs +++ b/src/bin/ngit/sub_commands/fetch.rs | |||
| @@ -20,7 +20,7 @@ pub struct SubCommandArgs { | |||
| 20 | 20 | ||
| 21 | pub async fn launch(args: &Cli, command_args: &SubCommandArgs) -> Result<()> { | 21 | pub async fn launch(args: &Cli, command_args: &SubCommandArgs) -> Result<()> { |
| 22 | let _ = args; | 22 | let _ = args; |
| 23 | let git_repo = Repo::discover().context("cannot find a git repository")?; | 23 | let git_repo = Repo::discover().context("failed to find a git repository")?; |
| 24 | let client = Client::default(); | 24 | let client = Client::default(); |
| 25 | let repo_coordinates = if command_args.repo.is_empty() { | 25 | let repo_coordinates = if command_args.repo.is_empty() { |
| 26 | get_repo_coordinates(&git_repo, &client).await? | 26 | get_repo_coordinates(&git_repo, &client).await? |