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); + }) }