From 0c8c4a61eab6b48422f6b6e660078b35de44b9a5 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 17 Nov 2024 18:58:22 +0100 Subject: [PATCH] fix(lua): dont serialize hash when None because it becomes an `userdata: NULL` and not `nil`, what?? --- src/api/change.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/change.rs b/src/api/change.rs index bbce5fc..ad1675d 100644 --- a/src/api/change.rs +++ b/src/api/change.rs @@ -13,6 +13,7 @@ #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] pub struct BufferUpdate { /// Optional content hash after applying this change. + #[cfg_attr(feature = "serialize", serde(skip_serializing_if = "Option::is_none"))] pub hash: Option, /// CRDT version after this change has been applied. pub version: Vec,