Make BlockMap::sync private

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-19 15:44:19 +01:00
parent dfbfa86548
commit 61d8848b31
3 changed files with 6 additions and 6 deletions

View File

@ -85,13 +85,13 @@ impl DisplayMap {
let (snapshot, edits) = self
.wrap_map
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
self.block_map.sync(&snapshot, edits, cx);
self.block_map.read(snapshot, edits, cx);
let (snapshot, edits) = fold_map.fold(ranges, cx);
let (snapshot, edits) = self.tab_map.sync(snapshot, edits);
let (snapshot, edits) = self
.wrap_map
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
self.block_map.sync(&snapshot, edits, cx);
self.block_map.read(snapshot, edits, cx);
}
pub fn unfold<T: ToOffset>(
@ -104,13 +104,13 @@ impl DisplayMap {
let (snapshot, edits) = self
.wrap_map
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
self.block_map.sync(&snapshot, edits, cx);
self.block_map.read(snapshot, edits, cx);
let (snapshot, edits) = fold_map.unfold(ranges, cx);
let (snapshot, edits) = self.tab_map.sync(snapshot, edits);
let (snapshot, edits) = self
.wrap_map
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
self.block_map.sync(&snapshot, edits, cx);
self.block_map.read(snapshot, edits, cx);
}
pub fn insert_blocks<P, T>(

View File

@ -163,7 +163,7 @@ impl BlockMap {
BlockMapWriter(self)
}
pub fn sync(&self, wrap_snapshot: &WrapSnapshot, edits: Vec<WrapEdit>, cx: &AppContext) {
fn sync(&self, wrap_snapshot: &WrapSnapshot, edits: Vec<WrapEdit>, cx: &AppContext) {
if edits.is_empty() {
return;
}

View File

@ -24,7 +24,7 @@ use smol::Timer;
use std::{
cell::RefCell,
cmp::{self, Ordering},
collections::{HashMap, HashSet},
collections::HashMap,
iter, mem,
ops::{Range, RangeInclusive},
rc::Rc,