Change summary
crates/project/src/project.rs | 6 +++---
crates/project_symbols/src/project_symbols.rs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
Detailed changes
@@ -479,7 +479,7 @@ impl Project {
.filter_map(move |worktree| worktree.upgrade(cx))
}
- pub fn strong_worktrees<'a>(
+ pub fn visible_worktrees<'a>(
&'a self,
cx: &'a AppContext,
) -> impl 'a + Iterator<Item = ModelHandle<Worktree>> {
@@ -2065,7 +2065,7 @@ impl Project {
) -> Task<Result<HashMap<ModelHandle<Buffer>, Vec<Range<Anchor>>>>> {
if self.is_local() {
let snapshots = self
- .strong_worktrees(cx)
+ .visible_worktrees(cx)
.filter_map(|tree| {
let tree = tree.read(cx).as_local()?;
Some(tree.snapshot())
@@ -2735,7 +2735,7 @@ impl Project {
buffer.update(cx, |buffer, cx| buffer.apply_ops(ops, cx))?;
}
OpenBuffer::Loading(operations) => operations.extend_from_slice(&ops),
- _ => unreachable!(),
+ OpenBuffer::Weak(_) => {}
},
hash_map::Entry::Vacant(e) => {
e.insert(OpenBuffer::Loading(ops));
@@ -270,7 +270,7 @@ impl ProjectSymbolsView {
range.end = cmp::min(range.end, view.matches.len());
let show_worktree_root_name =
- view.project.read(cx).strong_worktrees(cx).count() > 1;
+ view.project.read(cx).visible_worktrees(cx).count() > 1;
items.extend(view.matches[range].iter().enumerate().map(move |(ix, m)| {
view.render_match(m, start + ix, show_worktree_root_name, cx)
}));