From ca4da52e3970abf86d334e70b25e3d4fb4aa4167 Mon Sep 17 00:00:00 2001 From: Petros Amoiridis Date: Thu, 4 May 2023 20:28:45 +0300 Subject: [PATCH] Remove unused functions --- crates/collab_ui/src/collab_titlebar_item.rs | 30 +------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index f8c68e640ab201fd08d6f1e26f594f063abb2d32..a435a15130eef4db024e7a371fef56ffb4bebc44 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -17,7 +17,7 @@ use gpui::{ AppContext, Entity, ImageData, LayoutContext, ModelHandle, SceneBuilder, Subscription, View, ViewContext, ViewHandle, WeakViewHandle, }; -use project::{Project, Worktree}; +use project::Project; use settings::Settings; use std::{ops::Range, sync::Arc}; use theme::{AvatarStyle, Theme}; @@ -168,34 +168,6 @@ impl CollabTitlebarItem { } } - fn root_name_with_branch( - &self, - worktree: &ModelHandle, - cx: &ViewContext, - ) -> (String, String) { - let name = worktree.read(cx).root_name(); - let branch = worktree - .read(cx) - .snapshot() - .root_git_entry() - .and_then(|entry| entry.branch()) - .map(|branch| branch.to_string()) - .unwrap_or_else(|| "".to_owned()); - (name.to_owned(), branch) - } - - fn collect_root_names_with_branches( - &self, - project: &Project, - cx: &ViewContext, - ) -> Vec<(String, String)> { - let root_names_with_branches: Vec<(String, String)> = project - .visible_worktrees(cx) - .map(|worktree| self.root_name_with_branch(&worktree, cx)) - .collect(); - root_names_with_branches - } - fn collect_title_root_names(&self, project: &Project, cx: &ViewContext) -> String { let decorated_root_names: Vec<&str> = project.worktree_root_names(cx).collect(); if decorated_root_names.is_empty() {