text: Wrap BufferId into a newtype
This commit is contained in:
parent
941e838be9
commit
5ab715aac9
34 changed files with 687 additions and 383 deletions
|
@ -522,6 +522,7 @@ mod tests {
|
|||
use language::Capability;
|
||||
use project::Project;
|
||||
use settings::SettingsStore;
|
||||
use text::BufferId;
|
||||
use util::post_inc;
|
||||
|
||||
#[gpui::test]
|
||||
|
@ -822,8 +823,13 @@ mod tests {
|
|||
|
||||
let font = font("Helvetica");
|
||||
|
||||
let buffer =
|
||||
cx.new_model(|cx| Buffer::new(0, cx.entity_id().as_u64(), "abc\ndefg\nhijkl\nmn"));
|
||||
let buffer = cx.new_model(|cx| {
|
||||
Buffer::new(
|
||||
0,
|
||||
BufferId::new(cx.entity_id().as_u64()).unwrap(),
|
||||
"abc\ndefg\nhijkl\nmn",
|
||||
)
|
||||
});
|
||||
let multibuffer = cx.new_model(|cx| {
|
||||
let mut multibuffer = MultiBuffer::new(0, Capability::ReadWrite);
|
||||
multibuffer.push_excerpts(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue