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:
Lukas Wirth
2025-11-25 17:13:16 +01:00
committed by GitHub
parent ab80ef1845
commit fafe1afa61
39 changed files with 378 additions and 306 deletions
+6
View File
@@ -72,6 +72,12 @@ impl<K: Clone + Ord, V: Clone> TreeMap<K, V> {
self.0.insert_or_replace(MapEntry { key, value }, ());
}
pub fn insert_or_replace(&mut self, key: K, value: V) -> Option<V> {
self.0
.insert_or_replace(MapEntry { key, value }, ())
.map(|it| it.value)
}
pub fn extend(&mut self, iter: impl IntoIterator<Item = (K, V)>) {
let edits: Vec<_> = iter
.into_iter()