Use UpdateGlobal
accessors in more places (#11925)
This PR updates a number of instances that were previously using `cx.update_global` to use `UpdateGlobal::update_global` instead. Release Notes: - N/A
This commit is contained in:
parent
c1e291bc96
commit
13bbaf1e18
20 changed files with 66 additions and 68 deletions
|
@ -24,7 +24,8 @@ use fs::Fs;
|
|||
use futures::{future::join_all, StreamExt};
|
||||
use gpui::{
|
||||
list, AnyElement, AppContext, AsyncWindowContext, ClickEvent, EventEmitter, FocusHandle,
|
||||
FocusableView, ListAlignment, ListState, Model, ReadGlobal, Render, Task, View, WeakView,
|
||||
FocusableView, ListAlignment, ListState, Model, ReadGlobal, Render, Task, UpdateGlobal, View,
|
||||
WeakView,
|
||||
};
|
||||
use language::{language_settings::SoftWrap, LanguageRegistry};
|
||||
use markdown::{Markdown, MarkdownStyle};
|
||||
|
@ -124,7 +125,7 @@ impl AssistantPanel {
|
|||
})?;
|
||||
|
||||
cx.new_view(|cx| {
|
||||
let project_index = cx.update_global(|semantic_index: &mut SemanticIndex, cx| {
|
||||
let project_index = SemanticIndex::update_global(cx, |semantic_index, cx| {
|
||||
semantic_index.project_index(project.clone(), cx)
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue