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/lib/login/mod.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/lib/login/mod.rs')
| -rw-r--r-- | src/lib/login/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/login/mod.rs b/src/lib/login/mod.rs index d2725e7..00dbb17 100644 --- a/src/lib/login/mod.rs +++ b/src/lib/login/mod.rs | |||
| @@ -61,12 +61,12 @@ fn print_logged_in_as( | |||
| 61 | source: &SignerInfoSource, | 61 | source: &SignerInfoSource, |
| 62 | ) -> Result<()> { | 62 | ) -> Result<()> { |
| 63 | if !offline_mode && user_ref.metadata.created_at.eq(&Timestamp::from(0)) { | 63 | if !offline_mode && user_ref.metadata.created_at.eq(&Timestamp::from(0)) { |
| 64 | eprintln!("cannot find profile..."); | 64 | eprintln!("failed to find profile..."); |
| 65 | } else if !offline_mode && user_ref.metadata.name.eq(&user_ref.public_key.to_bech32()?) { | 65 | } else if !offline_mode && user_ref.metadata.name.eq(&user_ref.public_key.to_bech32()?) { |
| 66 | eprintln!("cannot extract account name from account metadata..."); | 66 | eprintln!("failed to extract account name from account metadata..."); |
| 67 | } else if !offline_mode && user_ref.relays.created_at.eq(&Timestamp::from(0)) { | 67 | } else if !offline_mode && user_ref.relays.created_at.eq(&Timestamp::from(0)) { |
| 68 | eprintln!( | 68 | eprintln!( |
| 69 | "cannot find your relay list. consider using another nostr client to create one to enhance your nostr experience." | 69 | "failed to find your relay list. consider using another nostr client to create one to enhance your nostr experience." |
| 70 | ); | 70 | ); |
| 71 | } | 71 | } |
| 72 | eprintln!( | 72 | eprintln!( |