Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was still learning Rust. But now it's just &mut AppContext vs &AppContext.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use context_menu::{ContextMenu, ContextMenuItem};
|
||||
use gpui::{
|
||||
elements::*, impl_internal_actions, CursorStyle, Element, ElementBox, Entity, MouseButton,
|
||||
MutableAppContext, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle,
|
||||
AppContext, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle,
|
||||
WeakViewHandle,
|
||||
};
|
||||
use settings::Settings;
|
||||
@@ -21,7 +21,7 @@ pub struct FocusTerminal {
|
||||
|
||||
impl_internal_actions!(terminal, [FocusTerminal, DeployTerminalMenu]);
|
||||
|
||||
pub fn init(cx: &mut MutableAppContext) {
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
cx.add_action(TerminalButton::deploy_terminal_menu);
|
||||
cx.add_action(TerminalButton::focus_terminal);
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ use gpui::{
|
||||
geometry::vector::Vector2F,
|
||||
impl_actions, impl_internal_actions,
|
||||
keymap_matcher::{KeymapContext, Keystroke},
|
||||
AnyViewHandle, AppContext, Element, ElementBox, Entity, ModelHandle, MutableAppContext, Task,
|
||||
View, ViewContext, ViewHandle, WeakViewHandle,
|
||||
AnyViewHandle, AppContext, Element, ElementBox, Entity, ModelHandle, Task, View, ViewContext,
|
||||
ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use project::{LocalWorktree, Project};
|
||||
use serde::Deserialize;
|
||||
@@ -68,7 +68,7 @@ impl_actions!(terminal, [SendText, SendKeystroke]);
|
||||
|
||||
impl_internal_actions!(project_panel, [DeployContextMenu]);
|
||||
|
||||
pub fn init(cx: &mut MutableAppContext) {
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
cx.add_action(TerminalView::deploy);
|
||||
|
||||
register_deserializable_item::<TerminalView>(cx);
|
||||
|
||||
Reference in New Issue
Block a user