mirror of
https://github.com/loro-dev/loro.git
synced 2025-02-06 04:19:34 +00:00
refactor: rm arc in tree hist cache
This commit is contained in:
parent
ca9298507e
commit
03c3e0b0b8
1 changed files with 4 additions and 4 deletions
|
@ -220,7 +220,7 @@ impl ContainerHistoryCache {
|
|||
}
|
||||
|
||||
#[enum_dispatch(OpGroupTrait)]
|
||||
#[derive(Debug, Clone, EnumAsInner)]
|
||||
#[derive(Debug, EnumAsInner)]
|
||||
pub(crate) enum HistoryCacheForImporting {
|
||||
Tree(TreeOpGroup),
|
||||
}
|
||||
|
@ -367,10 +367,10 @@ pub(crate) struct GroupedTreeOpInfo {
|
|||
pub(crate) value: Arc<TreeOp>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct TreeOpGroup {
|
||||
ops: BTreeMap<IdLp, GroupedTreeOpInfo>,
|
||||
tree_for_diff: Arc<Mutex<TreeCacheForDiff>>,
|
||||
tree_for_diff: Mutex<TreeCacheForDiff>,
|
||||
}
|
||||
|
||||
impl HistoryCacheTrait for TreeOpGroup {
|
||||
|
@ -391,7 +391,7 @@ impl TreeOpGroup {
|
|||
&self.ops
|
||||
}
|
||||
|
||||
pub fn tree(&self) -> &Arc<Mutex<TreeCacheForDiff>> {
|
||||
pub fn tree(&self) -> &Mutex<TreeCacheForDiff> {
|
||||
&self.tree_for_diff
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue