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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user