Skip to content

Commit

Permalink
fix: send only delta patches via DiamondTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
alemidev committed Jan 13, 2025
1 parent 362a968 commit 32255be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buffer/worker.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use diamond_types::list::encoding::EncodeOptions;
use diamond_types::list::encoding::ENCODE_PATCH;
use diamond_types::list::{Branch, OpLog};
use diamond_types::LocalVersion;
use tokio::sync::{mpsc, oneshot, watch};
Expand Down Expand Up @@ -192,7 +192,7 @@ impl BufferWorker {

if change.is_delete() || change.is_insert() {
tx.send(Operation {
data: self.oplog.encode_from(EncodeOptions::default(), &last_ver),
data: self.oplog.encode_from(ENCODE_PATCH, &last_ver),
})
.await
.unwrap_or_warn("failed to send change!");
Expand Down

0 comments on commit 32255be

Please sign in to comment.