History

update initialize project call to accomodate for test scenarios

KCaverly committed 3 years ago

Commit a892a511 parent 0b204bf1 file · +3 −5Browse files

Unified · Split

crates/semantic_index/src/semantic_index.rs+3−5
@@ -65,7 +65,7 @@ pub fn init( · 64 unmodified lines
65 let project = workspace.read(cx).project().clone();65 let project = workspace.read(cx).project().clone();
66 if project.read(cx).is_local() {66 if project.read(cx).is_local() {
67 semantic_index.update(cx, |index, cx| {67 semantic_index.update(cx, |index, cx| {
68 index.initialize_project(project, cx);68 index.initialize_project(project, cx).detach_and_log_err(cx)
69 });69 });
70 }70 }
71 }71 }
@@ -785,7 +785,7 @@ impl SemanticIndex { · 713 unmodified lines
785 &mut self,785 &mut self,
786 project: ModelHandle<Project>,786 project: ModelHandle<Project>,
787 cx: &mut ModelContext<Self>,787 cx: &mut ModelContext<Self>,
788 ) {788 ) -> Task<Result<()>> {
789 let worktree_scans_complete = project789 let worktree_scans_complete = project
790 .read(cx)790 .read(cx)
791 .worktrees(cx)791 .worktrees(cx)
@@ -931,10 +931,8 @@ impl SemanticIndex { · 139 unmodified lines
931 931
932 this.projects.insert(project.downgrade(), project_state);932 this.projects.insert(project.downgrade(), project_state);
933 });933 });
934 934 Result::<(), _>::Ok(())
935 cx.background().spawn(async move { anyhow::Ok(()) }).await
936 })935 })
937 .detach_and_log_err(cx)
938 }936 }
939 937
940 pub fn index_project(938 pub fn index_project(

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t