Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/loro-internal/src/diff_calc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ impl DiffCalculator {
InternalContainerDiff {
idx: container_idx,
bring_back,
is_container_deleted: false,
diff: diff.into(),
diff_mode,
},
Expand Down Expand Up @@ -326,7 +325,6 @@ impl DiffCalculator {
InternalContainerDiff {
idx,
bring_back: true,
is_container_deleted: false,
diff: DiffVariant::None,
diff_mode: DiffMode::Checkout,
},
Expand Down
1 change: 0 additions & 1 deletion crates/loro-internal/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub(crate) struct InternalContainerDiff {
pub(crate) idx: ContainerIdx,
/// Indicates whether this event was generated by a container that has been resurrected during a checkout operation.
pub(crate) bring_back: bool,
pub(crate) is_container_deleted: bool,
pub(crate) diff: DiffVariant,
/// This mode decides how should we apply the diff.
pub(crate) diff_mode: DiffMode,
Expand Down
7 changes: 0 additions & 7 deletions crates/loro-internal/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ impl DocState {
diffs.push(InternalContainerDiff {
idx: new,
bring_back: true,
is_container_deleted: false,
diff: external_diff.into(),
diff_mode: DiffMode::Checkout,
});
Expand Down Expand Up @@ -688,7 +687,6 @@ impl DocState {
diffs.push(InternalContainerDiff {
idx: new,
bring_back: true,
is_container_deleted: false,
diff: external_diff.into(),
diff_mode: DiffMode::Checkout,
});
Expand Down Expand Up @@ -861,7 +859,6 @@ impl DocState {
.map(|(&idx, state)| InternalContainerDiff {
idx,
bring_back: false,
is_container_deleted: false,
diff: state
.get_state_mut(
idx,
Expand Down Expand Up @@ -1248,10 +1245,6 @@ impl DocState {
for diff in diffs {
#[allow(clippy::unnecessary_to_owned)]
for container_diff in diff.diff.into_owned() {
if container_diff.is_container_deleted {
// omit event form deleted container
continue;
}
let Some((last_container_diff, _)) = containers.get_mut(&container_diff.idx) else {
if let Some(path) = self.get_path(container_diff.idx) {
containers.insert(container_diff.idx, (container_diff.diff, path));
Expand Down
1 change: 0 additions & 1 deletion crates/loro-internal/src/txn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ impl Transaction {
.map(|x| InternalContainerDiff {
idx: x.idx,
bring_back: false,
is_container_deleted: false,
diff: (x.diff.into()),
diff_mode: crate::diff_calc::DiffMode::Linear,
})
Expand Down