Fix type of Workspace::open_new_file context parameter

Max Brunsfeld created

Fixes #118

Change summary

gpui/src/app.rs      | 2 +-
zed/src/workspace.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Detailed changes

gpui/src/app.rs 🔗

@@ -723,7 +723,7 @@ impl MutableAppContext {
             if let Some(arg) = arg.downcast_ref() {
                 handler(arg, cx);
             } else {
-                log::error!("Could not downcast argument for action {}", name_clone);
+                log::error!("Could not downcast argument for global action {}", name_clone);
             }
         });
 

zed/src/workspace.rs 🔗

@@ -511,7 +511,7 @@ impl Workspace {
         }
     }
 
-    pub fn open_new_file(&mut self, _: &AppState, cx: &mut ViewContext<Self>) {
+    pub fn open_new_file(&mut self, _: &Arc<AppState>, cx: &mut ViewContext<Self>) {
         let buffer = cx.add_model(|cx| Buffer::new(0, "", cx));
         let buffer_view =
             cx.add_view(|cx| Editor::for_buffer(buffer.clone(), self.settings.clone(), cx));