From 95ef3abd2315eaaf42514f8e085089dad57f47b2 Mon Sep 17 00:00:00 2001 From: whs Date: Fri, 22 Nov 2024 19:02:45 +0800 Subject: [PATCH] Refactor --- src/cli/commands/init.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cli/commands/init.rs b/src/cli/commands/init.rs index d17c225..b508365 100644 --- a/src/cli/commands/init.rs +++ b/src/cli/commands/init.rs @@ -24,15 +24,13 @@ mod git { } } -pub(super) fn run(store: Detected, args: Args) -> Result<(), anyhow::Error> { +pub(super) fn run(store: Detected, args: Args) -> anyhow::Result<()> { match store { #[cfg(feature = "git")] Detected::Git(repo) => { use atom::store::Init; let repo = repo.to_thread_local(); - let remote = repo - .find_remote(args.git.remote.as_str()) - .map_err(Box::new)?; + let remote = repo.find_remote(args.git.remote.as_str())?; remote.ekala_init()? }, _ => {},