From e64c6d7b74583ee7444b0d2131b8ba78f6168512 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Sat, 23 May 2020 21:04:51 +0200 Subject: [PATCH] Tidy up git-solo --- src/bin/git-solo.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/bin/git-solo.rs b/src/bin/git-solo.rs index cc2baba..4edc6b4 100644 --- a/src/bin/git-solo.rs +++ b/src/bin/git-solo.rs @@ -6,10 +6,8 @@ fn main() { let main_author = get_main_author(); println!("{}", main_author); - with_repo_or_exit(truncate_gitmessage_template); -} - -fn truncate_gitmessage_template(repo: Repository) { - let path = gitmessage_template_file_path(repo); - let _template = File::create(path); + with_repo_or_exit(|repo: Repository| { + let path = gitmessage_template_file_path(repo); + let _template = File::create(path); + }) }