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/lib/git_events.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/git_events.rs') diff --git a/src/lib/git_events.rs b/src/lib/git_events.rs index 29c4cf2..bfe5b30 100644 --- a/src/lib/git_events.rs +++ b/src/lib/git_events.rs @@ -103,7 +103,7 @@ pub async fn generate_patch_event( nostr::event::Kind::GitPatch, git_repo .make_patch_from_commit(commit, &series_count) - .context(format!("cannot make patch for commit {commit}"))?, + .context(format!("failed to make patch for commit {commit}"))?, [ repo_ref .maintainers @@ -558,7 +558,7 @@ pub fn get_most_recent_patch_with_ancestors( } }) }) - .context("cannot find patches_with_youngest_created_at")? + .context("failed to find patches_with_youngest_created_at")? .id .to_string(); -- cgit v1.2.3