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/git_remote_nostr/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/git_remote_nostr/fetch.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/fetch.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/git_remote_nostr/fetch.rs b/src/bin/git_remote_nostr/fetch.rs index a972a2f..90387f3 100644 --- a/src/bin/git_remote_nostr/fetch.rs +++ b/src/bin/git_remote_nostr/fetch.rs | |||
| @@ -110,7 +110,7 @@ pub fn make_commits_for_proposal( | |||
| 110 | let commit_id = git_repo | 110 | let commit_id = git_repo |
| 111 | .create_commit_from_patch(patch, Some(tip_commit_id.clone())) | 111 | .create_commit_from_patch(patch, Some(tip_commit_id.clone())) |
| 112 | .context(format!( | 112 | .context(format!( |
| 113 | "cannot create commit for patch {}", | 113 | "failed to create commit for patch {}", |
| 114 | nip19::Nip19Event { | 114 | nip19::Nip19Event { |
| 115 | event_id: patch.id, | 115 | event_id: patch.id, |
| 116 | author: Some(patch.pubkey), | 116 | author: Some(patch.pubkey), |
| @@ -146,7 +146,7 @@ async fn fetch_proposals( | |||
| 146 | { | 146 | { |
| 147 | if let Err(error) = make_commits_for_proposal(git_repo, repo_ref, patches) { | 147 | if let Err(error) = make_commits_for_proposal(git_repo, repo_ref, patches) { |
| 148 | term.write_line( | 148 | term.write_line( |
| 149 | format!("WARNING: cannot create branch for {refstr}, error: {error}",) | 149 | format!("WARNING: failed to create branch for {refstr}, error: {error}",) |
| 150 | .as_str(), | 150 | .as_str(), |
| 151 | )?; | 151 | )?; |
| 152 | break; | 152 | break; |