diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-02 14:37:14 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-05 21:30:59 +0100 |
| commit | a744f4aae9ffee9dd246090bef486b09433778d0 (patch) | |
| tree | 5d1083668ec989d1fc8529a7ece60dc2bd4ec594 /src/lib/login/mod.rs | |
| parent | 0f3969325385f2707e359cb28d9c49c509310452 (diff) | |
chore: nix flake update
update nix dependancies to latest version using default update options
run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
Diffstat (limited to 'src/lib/login/mod.rs')
| -rw-r--r-- | src/lib/login/mod.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/login/mod.rs b/src/lib/login/mod.rs index c37375f..bfc7328 100644 --- a/src/lib/login/mod.rs +++ b/src/lib/login/mod.rs | |||
| @@ -93,11 +93,7 @@ pub async fn get_likely_logged_in_user(git_repo_path: &Path) -> Result<Option<Pu | |||
| 93 | let git_repo = Repo::from_path(&git_repo_path.to_path_buf())?; | 93 | let git_repo = Repo::from_path(&git_repo_path.to_path_buf())?; |
| 94 | Ok( | 94 | Ok( |
| 95 | if let Some(npub) = git_repo.get_git_config_item("nostr.npub", None)? { | 95 | if let Some(npub) = git_repo.get_git_config_item("nostr.npub", None)? { |
| 96 | if let Ok(pubic_key) = PublicKey::parse(&npub) { | 96 | PublicKey::parse(&npub).ok() |
| 97 | Some(pubic_key) | ||
| 98 | } else { | ||
| 99 | None | ||
| 100 | } | ||
| 101 | } else { | 97 | } else { |
| 102 | None | 98 | None |
| 103 | }, | 99 | }, |
| @@ -107,11 +103,7 @@ pub async fn get_likely_logged_in_user(git_repo_path: &Path) -> Result<Option<Pu | |||
| 107 | pub fn get_curent_user(git_repo: &Repo) -> Result<Option<PublicKey>> { | 103 | pub fn get_curent_user(git_repo: &Repo) -> Result<Option<PublicKey>> { |
| 108 | Ok( | 104 | Ok( |
| 109 | if let Some(npub) = git_repo.get_git_config_item("nostr.npub", None)? { | 105 | if let Some(npub) = git_repo.get_git_config_item("nostr.npub", None)? { |
| 110 | if let Ok(public_key) = PublicKey::parse(&npub) { | 106 | PublicKey::parse(&npub).ok() |
| 111 | Some(public_key) | ||
| 112 | } else { | ||
| 113 | None | ||
| 114 | } | ||
| 115 | } else { | 107 | } else { |
| 116 | None | 108 | None |
| 117 | }, | 109 | }, |