upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/sub_commands/logout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit/sub_commands/logout.rs')
-rw-r--r--src/bin/ngit/sub_commands/logout.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/bin/ngit/sub_commands/logout.rs b/src/bin/ngit/sub_commands/logout.rs
index 2df96c8..da445b4 100644
--- a/src/bin/ngit/sub_commands/logout.rs
+++ b/src/bin/ngit/sub_commands/logout.rs
@@ -11,12 +11,7 @@ use crate::{
11 11
12pub async fn launch() -> Result<()> { 12pub async fn launch() -> Result<()> {
13 let git_repo_result = Repo::discover().context("failed to find a git repository"); 13 let git_repo_result = Repo::discover().context("failed to find a git repository");
14 let git_repo = { 14 let git_repo = { git_repo_result.ok() };
15 match git_repo_result {
16 Ok(git_repo) => Some(git_repo),
17 Err(_) => None,
18 }
19 };
20 logout(git_repo.as_ref()).await 15 logout(git_repo.as_ref()).await
21} 16}
22 17