Rename build_view to new_view and build_model to new_model

The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
This commit is contained in:
Nathan Sobo
2024-01-01 17:42:01 -07:00
parent 219999cd8d
commit db1cf8f6e1
97 changed files with 470 additions and 494 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ impl<'a> VimTestContext<'a> {
observe_keystrokes(cx);
workspace.active_pane().update(cx, |pane, cx| {
pane.toolbar().update(cx, |toolbar, cx| {
let buffer_search_bar = cx.build_view(BufferSearchBar::new);
let buffer_search_bar = cx.new_view(BufferSearchBar::new);
toolbar.add_item(buffer_search_bar, cx);
// todo!();
// let project_search_bar = cx.add_view(|_| ProjectSearchBar::new());
@@ -65,7 +65,7 @@ impl<'a> VimTestContext<'a> {
})
});
workspace.status_bar().update(cx, |status_bar, cx| {
let vim_mode_indicator = cx.build_view(ModeIndicator::new);
let vim_mode_indicator = cx.new_view(ModeIndicator::new);
status_bar.add_right_item(vim_mode_indicator, cx);
});
});