Remove Worktree::abs_path

I'd like to only have methods related to absolute paths on local worktrees, because it's not really possible to implement them on remote worktrees since we don't know the full path being shared and wouldn't have anything to do with it anyway if we did.
This commit is contained in:
Nathan Sobo
2022-01-22 14:44:58 -07:00
parent e2a2073bdb
commit d192b6ebc7
3 changed files with 16 additions and 23 deletions
+3 -7
View File
@@ -122,13 +122,9 @@ impl ItemView for Editor {
}
fn title(&self, cx: &AppContext) -> String {
let filename = self
.buffer()
.read(cx)
.file(cx)
.and_then(|file| file.file_name(cx));
if let Some(name) = filename {
name.to_string_lossy().into()
let file = self.buffer().read(cx).file(cx);
if let Some(file) = file {
file.file_name(cx).to_string_lossy().into()
} else {
"untitled".into()
}