diff --git a/crates/fs/src/fake_git_repo.rs b/crates/fs/src/fake_git_repo.rs index f969d0143ed6d7b6382868d8dcf14eb517c587ab..02061ecbb70bf8e323981474deb5ac71d6dbad1b 100644 --- a/crates/fs/src/fake_git_repo.rs +++ b/crates/fs/src/fake_git_repo.rs @@ -353,8 +353,8 @@ impl GitRepository for FakeGitRepository { fn rename_branch(&self, new_name: String) -> BoxFuture<'_, Result<()>> { self.with_state_async(true, move |state| { if let Some(current_branch) = &state.current_branch_name { - state.branches.remove(current_branch); state.branches.insert(new_name.clone()); + state.branches.remove(current_branch); state.current_branch_name = Some(new_name); } Ok(())