Remove unused functions

This commit is contained in:
Petros Amoiridis 2023-05-04 20:28:45 +03:00 committed by Mikayla Maki
parent e057b0193f
commit ca4da52e39
No known key found for this signature in database

View file

@ -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<Worktree>,
cx: &ViewContext<Self>,
) -> (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<Self>,
) -> 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<Self>) -> String {
let decorated_root_names: Vec<&str> = project.worktree_root_names(cx).collect();
if decorated_root_names.is_empty() {