summaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorCyborus <cyborus@noreply.codeberg.org>2024-08-11 17:26:18 +0200
committerCyborus <cyborus@noreply.codeberg.org>2024-08-11 17:26:18 +0200
commitb7120d23f4e295d44ab451c342f04b9b72bc8f1c (patch)
treefc4bf9fab8a374a400083c5bf67b5a1e872bbdd8 /src/auth.rs
parentMerge pull request 'application settings page url should only be `https`' (#1... (diff)
parentClippy Fixes (diff)
downloadforgejo-cli-b7120d23f4e295d44ab451c342f04b9b72bc8f1c.tar.xz
forgejo-cli-b7120d23f4e295d44ab451c342f04b9b72bc8f1c.zip
Merge pull request 'Squish clippy and audit errors/warnings' (#120) from Pi-Cla/forgejo-cli:fixes into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/120 Reviewed-by: Cyborus <cyborus@noreply.codeberg.org>
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/auth.rs b/src/auth.rs
index 44cb20c..c0bd467 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -58,7 +58,7 @@ impl AuthCommand {
Some(key) => key,
None => crate::readline("new key: ").await?.trim().to_string(),
};
- if keys.hosts.get(&user).is_none() {
+ if !keys.hosts.contains_key(&user) {
keys.hosts.insert(
host,
crate::keys::LoginInfo::Application {