chore: rebase

This commit is contained in:
leeeon233 2022-12-13 23:06:21 +08:00
parent 815b95d126
commit 4cfdbff768
3 changed files with 4 additions and 4 deletions

View file

@ -112,7 +112,7 @@ impl LogStore {
fn get_events(&mut self, context: &mut ImportContext) -> Vec<RawEvent> {
let deleted = self.with_hierarchy(|_, h| h.take_deleted());
let mut events = Vec::with_capacity(context.diff.len());
let mut h = self.hierarchy.try_lock().unwrap();
let h = self.hierarchy.try_lock().unwrap();
let reg = &self.reg;
for (id, diff) in std::mem::take(&mut context.diff)
.into_iter()

View file

@ -281,7 +281,7 @@ fn test_encode_state_map() {
}
#[test]
fn fields_sort_immutable() {
fn fix_fields_order() {
// ContainerType ContainerID Index ID
// TotalOrderStamp RemoteContent MapSet ListOp DeleteSpan ListSlice (mod test)
let id = ID::new(0, 1);

View file

@ -141,12 +141,12 @@ impl Loro {
#[wasm_bindgen(js_name = "exportSnapshot")]
pub fn export_snapshot(&self) -> JsResult<Vec<u8>> {
Ok(self.0.encode_snapshot())
Ok(self.0.encode_snapshot(false))
}
#[wasm_bindgen(js_name = "importSnapshot")]
pub fn import_snapshot(input: Vec<u8>) -> Self {
let core = LoroCore::decode_snapshot(&input, None, Default::default());
let core = LoroCore::decode_snapshot(&input, Default::default(), None);
Self(core)
}