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:
parent
dd00966cc6
commit
de9bf6dfbd
112 changed files with 882 additions and 1041 deletions
|
@ -1,11 +1,11 @@
|
|||
use std::{any::TypeId, ops::DerefMut};
|
||||
|
||||
use collections::HashSet;
|
||||
use gpui::{AnyViewHandle, Entity, MutableAppContext, View, ViewContext, ViewHandle};
|
||||
use gpui::{AnyViewHandle, Entity, AppContext, View, ViewContext, ViewHandle};
|
||||
|
||||
use crate::Workspace;
|
||||
|
||||
pub fn init(cx: &mut MutableAppContext) {
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
cx.set_global(NotificationTracker::new());
|
||||
simple_message_notification::init(cx);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ pub mod simple_message_notification {
|
|||
use gpui::{
|
||||
actions,
|
||||
elements::{Flex, MouseEventHandler, Padding, ParentElement, Svg, Text},
|
||||
impl_actions, Action, CursorStyle, Element, Entity, MouseButton, MutableAppContext, View,
|
||||
impl_actions, Action, CursorStyle, Element, Entity, MouseButton, AppContext, View,
|
||||
ViewContext,
|
||||
};
|
||||
use menu::Cancel;
|
||||
|
@ -162,7 +162,7 @@ pub mod simple_message_notification {
|
|||
|
||||
impl_actions!(message_notifications, [OsOpen]);
|
||||
|
||||
pub fn init(cx: &mut MutableAppContext) {
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
cx.add_action(MessageNotification::dismiss);
|
||||
cx.add_action(
|
||||
|_workspace: &mut Workspace, open_action: &OsOpen, cx: &mut ViewContext<Workspace>| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue