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 --- test_utils/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test_utils/src/lib.rs') diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index ec05cfd..6ca0a43 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -1054,7 +1054,7 @@ where /** copied from client.rs */ async fn get_local_cache_database(git_repo_path: &Path) -> Result { NostrLMDB::open(git_repo_path.join(".git/nostr-cache.lmdb")) - .context("cannot open or create nostr cache database at .git/nostr-cache.lmdb") + .context("failed to open or create nostr cache database at .git/nostr-cache.lmdb") } /** copied from client.rs */ @@ -1067,7 +1067,7 @@ pub async fn get_events_from_cache( .query(filters.clone()) .await .context( - "cannot execute query on opened git repo nostr cache database .git/nostr-cache.lmdb", + "failed to execute query on opened git repo nostr cache database .git/nostr-cache.lmdb", )? .to_vec()) } @@ -1107,7 +1107,7 @@ pub fn get_proposal_branch_name_from_events( )); } } - bail!("cannot find proposal root with branch-name tag matching title") + bail!("failed to find proposal root with branch-name tag matching title") } pub static FEATURE_BRANCH_NAME_1: &str = "feature-example-t"; -- cgit v1.2.3