Avoid passing a closure to workspace::register_project_item

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-17 17:34:35 +01:00
parent 4bbfd0918e
commit 2b4738d82d
2 changed files with 6 additions and 9 deletions

View file

@ -340,9 +340,7 @@ pub fn init(cx: &mut MutableAppContext) {
cx.add_async_action(Editor::confirm_rename);
cx.add_async_action(Editor::find_all_references);
workspace::register_project_item(cx, |project, buffer, cx| {
Editor::for_buffer(buffer, Some(project), cx)
});
workspace::register_project_item::<Editor>(cx);
}
trait SelectionExt {