Skip to content

Commit 87762a1

Browse files
authored
refactor: rm redundant config (#726)
1 parent c7a23e4 commit 87762a1

4 files changed

Lines changed: 0 additions & 11 deletions

File tree

crates/loro-internal/src/diff_calc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ impl DiffCalculator {
298298
InternalContainerDiff {
299299
idx: container_idx,
300300
bring_back,
301-
is_container_deleted: false,
302301
diff: diff.into(),
303302
diff_mode,
304303
},
@@ -326,7 +325,6 @@ impl DiffCalculator {
326325
InternalContainerDiff {
327326
idx,
328327
bring_back: true,
329-
is_container_deleted: false,
330328
diff: DiffVariant::None,
331329
diff_mode: DiffMode::Checkout,
332330
},

crates/loro-internal/src/event.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ pub(crate) struct InternalContainerDiff {
9696
pub(crate) idx: ContainerIdx,
9797
/// Indicates whether this event was generated by a container that has been resurrected during a checkout operation.
9898
pub(crate) bring_back: bool,
99-
pub(crate) is_container_deleted: bool,
10099
pub(crate) diff: DiffVariant,
101100
/// This mode decides how should we apply the diff.
102101
pub(crate) diff_mode: DiffMode,

crates/loro-internal/src/state.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,6 @@ impl DocState {
584584
diffs.push(InternalContainerDiff {
585585
idx: new,
586586
bring_back: true,
587-
is_container_deleted: false,
588587
diff: external_diff.into(),
589588
diff_mode: DiffMode::Checkout,
590589
});
@@ -688,7 +687,6 @@ impl DocState {
688687
diffs.push(InternalContainerDiff {
689688
idx: new,
690689
bring_back: true,
691-
is_container_deleted: false,
692690
diff: external_diff.into(),
693691
diff_mode: DiffMode::Checkout,
694692
});
@@ -861,7 +859,6 @@ impl DocState {
861859
.map(|(&idx, state)| InternalContainerDiff {
862860
idx,
863861
bring_back: false,
864-
is_container_deleted: false,
865862
diff: state
866863
.get_state_mut(
867864
idx,
@@ -1248,10 +1245,6 @@ impl DocState {
12481245
for diff in diffs {
12491246
#[allow(clippy::unnecessary_to_owned)]
12501247
for container_diff in diff.diff.into_owned() {
1251-
if container_diff.is_container_deleted {
1252-
// omit event form deleted container
1253-
continue;
1254-
}
12551248
let Some((last_container_diff, _)) = containers.get_mut(&container_diff.idx) else {
12561249
if let Some(path) = self.get_path(container_diff.idx) {
12571250
containers.insert(container_diff.idx, (container_diff.diff, path));

crates/loro-internal/src/txn.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ impl Transaction {
480480
.map(|x| InternalContainerDiff {
481481
idx: x.idx,
482482
bring_back: false,
483-
is_container_deleted: false,
484483
diff: (x.diff.into()),
485484
diff_mode: crate::diff_calc::DiffMode::Linear,
486485
})

0 commit comments

Comments
 (0)