From 0cbf5e25487fee3b147760c6f120eb4716cd19e7 Mon Sep 17 00:00:00 2001 From: leeeon233 Date: Sun, 26 Mar 2023 17:20:02 +0800 Subject: [PATCH] fix: lamport order --- crates/loro-internal/src/log_store/import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/loro-internal/src/log_store/import.rs b/crates/loro-internal/src/log_store/import.rs index de837469..bebbea55 100644 --- a/crates/loro-internal/src/log_store/import.rs +++ b/crates/loro-internal/src/log_store/import.rs @@ -378,7 +378,7 @@ impl LogStore { .into_values() .flat_map(|c| c.into_iter()) // sort changes by lamport from small to large - .sorted_by(|a, b| Ord::cmp(&b.lamport, &a.lamport)) + .sorted_by(|a, b| a.lamport.cmp(&b.lamport)) .for_each(|c| { let c_client_id = c.id.client_id; if pending_clients.contains(&c_client_id) {