multi_buffer: Remove redundant buffer id field (#43459)
It is easy for us to get the two fields out of sync causing weird problems, there is no reason to have both here so. Release Notes: - N/A *or* Added/Fixed/Improved ... Co-authored by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
1 parent
ab80ef1845
commit
fafe1afa61
39 files changed
+378
-306
No files matched your search
@@ -3401,14 +3401,11 @@ fn test_summaries_for_anchors(cx: &mut TestAppContext) {
|
||||
),
|
||||
);
|
||||
|
||||
let id_1 = buffer_1.read_with(cx, |buffer, _| buffer.remote_id());
|
||||
let id_2 = buffer_2.read_with(cx, |buffer, _| buffer.remote_id());
|
||||
|
||||
let anchor_1 = Anchor::in_buffer(ids[0], id_1, text::Anchor::MIN);
|
||||
let anchor_1 = Anchor::in_buffer(ids[0], text::Anchor::MIN);
|
||||
let point_1 = snapshot.summaries_for_anchors::<Point, _>([&anchor_1])[0];
|
||||
assert_eq!(point_1, Point::new(0, 0));
|
||||
|
||||
let anchor_2 = Anchor::in_buffer(ids[1], id_2, text::Anchor::MIN);
|
||||
let anchor_2 = Anchor::in_buffer(ids[1], text::Anchor::MIN);
|
||||
let point_2 = snapshot.summaries_for_anchors::<Point, _>([&anchor_2])[0];
|
||||
assert_eq!(point_2, Point::new(3, 0));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user