editor: Shrink DisplayMapSnapshot from 824 to 256 bytes (#39568)

We have unnecessary clones for the fields here as most of the snapshots
contain the others hierarchically.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-10-06 08:08:49 +00:00
committed by GitHub
parent 9c7369f54d
commit 2bfcd60b88
48 changed files with 594 additions and 543 deletions
+2 -2
View File
@@ -902,7 +902,7 @@ fn assert_pending_input(cx: &mut VimTestContext, expected: &str) {
assert_eq!(
highlights
.iter()
.map(|highlight| highlight.to_offset(&snapshot.buffer_snapshot))
.map(|highlight| highlight.to_offset(&snapshot.buffer_snapshot()))
.collect::<Vec<_>>(),
ranges
)
@@ -962,7 +962,7 @@ async fn test_jk_delay(cx: &mut gpui::TestAppContext) {
assert_eq!(
highlights
.iter()
.map(|highlight| highlight.to_offset(&snapshot.buffer_snapshot))
.map(|highlight| highlight.to_offset(&snapshot.buffer_snapshot()))
.collect::<Vec<_>>(),
vec![0..1]
)