Merge pull request #72 from hexedtech/fix/lua-userdata-null
Some checks failed
test / test-unit (push) Has been cancelled
test / test-beta (nightly) (push) Has been cancelled
test / test-build (lua, ubuntu-latest) (push) Has been cancelled
test / test-beta (beta) (push) Has been cancelled
test / test-functional (push) Has been cancelled
test / test-build (java, macos-latest) (push) Has been cancelled
test / test-build (java, ubuntu-latest) (push) Has been cancelled
test / test-build (java, windows-latest) (push) Has been cancelled
test / test-build (js, macos-latest) (push) Has been cancelled
test / test-build (js, ubuntu-latest) (push) Has been cancelled
test / test-build (js, windows-latest) (push) Has been cancelled
test / test-build (lua, macos-latest) (push) Has been cancelled
test / test-build (lua, windows-latest) (push) Has been cancelled
test / test-build (py, macos-latest) (push) Has been cancelled
test / test-build (py, ubuntu-latest) (push) Has been cancelled
test / test-build (py, windows-latest) (push) Has been cancelled

fix(lua): dont serialize hash when None
This commit is contained in:
əlemi 2024-11-18 16:15:55 +01:00 committed by GitHub
commit 0e68e89ce8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,7 @@
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub struct BufferUpdate { pub struct BufferUpdate {
/// Optional content hash after applying this change. /// Optional content hash after applying this change.
#[cfg_attr(feature = "serialize", serde(skip_serializing_if = "Option::is_none"))]
pub hash: Option<i64>, pub hash: Option<i64>,
/// CRDT version after this change has been applied. /// CRDT version after this change has been applied.
pub version: Vec<i64>, pub version: Vec<i64>,