upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/test_utils/src/lib.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-11-26 07:48:30 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-11-26 12:26:47 +0000
commita0593e3aa9b19b9ca3c3881cbe0d9d207fe46d2c (patch)
tree3482e7c558eff09cc91604ad6ddcd02cf2c94699 /test_utils/src/lib.rs
parent1332c625b75fce616e06b415c99a068bc45c8210 (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 'test_utils/src/lib.rs')
-rw-r--r--test_utils/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
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
1054/** copied from client.rs */ 1054/** copied from client.rs */
1055async fn get_local_cache_database(git_repo_path: &Path) -> Result<NostrLMDB> { 1055async fn get_local_cache_database(git_repo_path: &Path) -> Result<NostrLMDB> {
1056 NostrLMDB::open(git_repo_path.join(".git/nostr-cache.lmdb")) 1056 NostrLMDB::open(git_repo_path.join(".git/nostr-cache.lmdb"))
1057 .context("cannot open or create nostr cache database at .git/nostr-cache.lmdb") 1057 .context("failed to open or create nostr cache database at .git/nostr-cache.lmdb")
1058} 1058}
1059 1059
1060/** copied from client.rs */ 1060/** copied from client.rs */
@@ -1067,7 +1067,7 @@ pub async fn get_events_from_cache(
1067 .query(filters.clone()) 1067 .query(filters.clone())
1068 .await 1068 .await
1069 .context( 1069 .context(
1070 "cannot execute query on opened git repo nostr cache database .git/nostr-cache.lmdb", 1070 "failed to execute query on opened git repo nostr cache database .git/nostr-cache.lmdb",
1071 )? 1071 )?
1072 .to_vec()) 1072 .to_vec())
1073} 1073}
@@ -1107,7 +1107,7 @@ pub fn get_proposal_branch_name_from_events(
1107 )); 1107 ));
1108 } 1108 }
1109 } 1109 }
1110 bail!("cannot find proposal root with branch-name tag matching title") 1110 bail!("failed to find proposal root with branch-name tag matching title")
1111} 1111}
1112 1112
1113pub static FEATURE_BRANCH_NAME_1: &str = "feature-example-t"; 1113pub static FEATURE_BRANCH_NAME_1: &str = "feature-example-t";