From 32255bec555bc33753af9c5bbd67239cc328b406 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 13 Jan 2025 12:37:58 +0100 Subject: [PATCH] fix: send only delta patches via DiamondTypes --- src/buffer/worker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer/worker.rs b/src/buffer/worker.rs index 8a9b405..fa3e8e3 100644 --- a/src/buffer/worker.rs +++ b/src/buffer/worker.rs @@ -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}; @@ -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!");