From 32bb1dc15a6dbfa289e3acadd1f5828da2213d0f Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 5 Nov 2023 00:07:51 +0000 Subject: [PATCH] fmt --- .../builder/framework_generate_upgrade_proposal.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/framework/src/builder/framework_generate_upgrade_proposal.rs b/framework/src/builder/framework_generate_upgrade_proposal.rs index 04184795b..c52b3a0b0 100644 --- a/framework/src/builder/framework_generate_upgrade_proposal.rs +++ b/framework/src/builder/framework_generate_upgrade_proposal.rs @@ -29,7 +29,8 @@ pub fn make_framework_upgrade_artifacts( framework_local_dir: &Path, core_modules: &Option>, ) -> Result> { - let framework_git_hash = &get_framework_git_head(framework_local_dir).unwrap_or("none".to_owned()); + let framework_git_hash = + &get_framework_git_head(framework_local_dir).unwrap_or("none".to_owned()); let deploy_to_account = AccountAddress::from_hex_literal(CORE_MODULE_ADDRESS)?; @@ -218,12 +219,9 @@ pub fn save_build( Ok(()) } - fn get_framework_git_head(path: &Path) -> anyhow::Result { - let r = git2::Repository::discover(path).unwrap(); - let id = r.head()? - .peel_to_commit()? - .id(); + let r = git2::Repository::discover(path).unwrap(); + let id = r.head()?.peel_to_commit()?.id(); - Ok(id.to_string()) -} \ No newline at end of file + Ok(id.to_string()) +}