From d5ff348a21fa08134c1146a95f6ba559832fc9e6 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Fri, 24 May 2024 10:31:43 +0200 Subject: [PATCH] feat: Update base branch handling to use anyhow --- crates/gitbutler-core/src/virtual_branches/base.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/gitbutler-core/src/virtual_branches/base.rs b/crates/gitbutler-core/src/virtual_branches/base.rs index 54ef2690f..4b8d8476e 100644 --- a/crates/gitbutler-core/src/virtual_branches/base.rs +++ b/crates/gitbutler-core/src/virtual_branches/base.rs @@ -336,9 +336,9 @@ fn _print_tree(repo: &git2::Repository, tree: &git2::Tree) -> Result<()> { pub fn update_base_branch( project_repository: &project_repository::Repository, user: Option<&users::User>, -) -> Result<(), errors::UpdateBaseBranchError> { +) -> anyhow::Result<()> { if project_repository.is_resolving() { - return Err(errors::UpdateBaseBranchError::Conflict( + anyhow::bail!(errors::UpdateBaseBranchError::Conflict( errors::ProjectConflict { project_id: project_repository.project().id, },