Fix type of Workspace::open_new_file context parameter

Fixes #118
This commit is contained in:
Max Brunsfeld 2021-07-30 10:11:46 -07:00
parent 33b9a6e281
commit 4c3f97d123
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
});

View File

@ -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));