mirror of
https://github.com/loro-dev/loro.git
synced 2025-02-08 21:47:41 +00:00
Fix encoding of oplog snapshot (#168)
This commit is contained in:
parent
ce1077654a
commit
505ad4275b
1 changed files with 3 additions and 3 deletions
|
@ -927,16 +927,16 @@ fn encode_oplog(oplog: &OpLog, state_ref: Option<PreEncodedState>) -> FinalPhase
|
||||||
loro_common::ContainerType::Tree => unreachable!(),
|
loro_common::ContainerType::Tree => unreachable!(),
|
||||||
},
|
},
|
||||||
InnerListOp::InsertText {
|
InnerListOp::InsertText {
|
||||||
slice,
|
slice: _,
|
||||||
unicode_len: len,
|
unicode_len: len,
|
||||||
unicode_start: _,
|
unicode_start: start,
|
||||||
pos,
|
pos,
|
||||||
} => match op.container.get_type() {
|
} => match op.container.get_type() {
|
||||||
loro_common::ContainerType::Text => {
|
loro_common::ContainerType::Text => {
|
||||||
encoded_ops.push(EncodedSnapshotOp::from(
|
encoded_ops.push(EncodedSnapshotOp::from(
|
||||||
SnapshotOp::RichtextInsert {
|
SnapshotOp::RichtextInsert {
|
||||||
pos: *pos as usize,
|
pos: *pos as usize,
|
||||||
start: slice.start(),
|
start: *start as usize,
|
||||||
len: *len as usize,
|
len: *len as usize,
|
||||||
},
|
},
|
||||||
op.container.to_index(),
|
op.container.to_index(),
|
||||||
|
|
Loading…
Reference in a new issue