chore: explaining an extra thing

This commit is contained in:
cschen 2024-08-14 13:34:01 +02:00
parent 4d65b2db7d
commit ef9da1740a

View file

@ -142,9 +142,8 @@ impl ControllerWorker<TextChange> for BufferWorker {
// we give it to the controller so that he knows where it's at. // we give it to the controller so that he knows where it's at.
let step_ver = oplog.version_union(&[lv.start], &last_ver); let step_ver = oplog.version_union(&[lv.start], &last_ver);
// if you merge up until the oplog.local_version_ref() // moved the merging inside as we only need
// it's as if you are merging the whole iterator. // an up to date content when we hash the content.
// Not just this change...
let hash = if timer.step() { let hash = if timer.step() {
branch.merge(&oplog, &step_ver); branch.merge(&oplog, &step_ver);
let hash = xxhash_rust::xxh3::xxh3_64(branch.content().to_string().as_bytes()); let hash = xxhash_rust::xxh3::xxh3_64(branch.content().to_string().as_bytes());