From a0a7dc10809b074e4486e1d996682514653d1079 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Wed, 5 Jul 2023 19:08:27 +0800 Subject: [PATCH] test: fix fuzz test err --- crates/loro-internal/src/fuzz.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/loro-internal/src/fuzz.rs b/crates/loro-internal/src/fuzz.rs index 66a611f4..17174808 100644 --- a/crates/loro-internal/src/fuzz.rs +++ b/crates/loro-internal/src/fuzz.rs @@ -156,10 +156,12 @@ impl Actionable for Vec { text.delete(&txn, *pos, *len).unwrap(); } Action::Sync { from, to } => { - let (from, to) = arref::array_mut_ref!(self, [*from as usize, *to as usize]); - let to_vv = to.vv_cloned(); - let from_exported = from.export(to_vv); - to.import(from_exported); + if from != to { + let (from, to) = arref::array_mut_ref!(self, [*from as usize, *to as usize]); + let to_vv = to.vv_cloned(); + let from_exported = from.export(to_vv); + to.import(from_exported); + } } Action::SyncAll => { for i in 1..self.len() {