Move InlayId generation back to InlayCache

This commit is contained in:
Kirill Bulatov
2023-06-29 22:25:49 +03:00
parent e82b4d8957
commit 8c03e9e122
7 changed files with 147 additions and 133 deletions
+2 -1
View File
@@ -1475,6 +1475,7 @@ mod tests {
Arc::new((HighlightStyle::default(), highlight_ranges)),
);
let mut next_inlay_id = 0;
for _ in 0..operations {
log::info!("text: {:?}", buffer_snapshot.text());
let mut buffer_edits = Vec::new();
@@ -1484,7 +1485,7 @@ mod tests {
snapshot_edits.extend(map.randomly_mutate(&mut rng));
}
40..=59 => {
let (_, edits) = inlay_map.randomly_mutate(&mut rng);
let (_, edits) = inlay_map.randomly_mutate(&mut next_inlay_id, &mut rng);
inlay_edits = edits;
}
_ => buffer.update(cx, |buffer, cx| {