diff --git a/libs/collab-rt-protocol/src/message.rs b/libs/collab-rt-protocol/src/message.rs index 849ea2907..557555521 100644 --- a/libs/collab-rt-protocol/src/message.rs +++ b/libs/collab-rt-protocol/src/message.rs @@ -43,7 +43,7 @@ impl Encode for Message { }, Message::Awareness(update) => { encoder.write_var(MSG_AWARENESS); - encoder.write_buf(&update) + encoder.write_buf(update) }, Message::Custom(msg) => { encoder.write_var(MSG_CUSTOM); diff --git a/libs/collab-stream/src/model.rs b/libs/collab-stream/src/model.rs index f41fdc1c1..205349da5 100644 --- a/libs/collab-stream/src/model.rs +++ b/libs/collab-stream/src/model.rs @@ -427,8 +427,7 @@ impl FromRedisValue for CollabStreamUpdateBatch { None => CollabOrigin::Empty, Some(sender) => { let raw_origin = String::from_redis_value(sender)?; - let collab_origin = collab_origin_from_str(&raw_origin)?; - collab_origin + collab_origin_from_str(&raw_origin)? }, }; let state_vector = match fields.get("sv") { @@ -495,8 +494,7 @@ impl FromRedisValue for AwarenessStreamUpdateBatch { None => CollabOrigin::Empty, Some(sender) => { let raw_origin = String::from_redis_value(sender)?; - let collab_origin = collab_origin_from_str(&raw_origin)?; - collab_origin + collab_origin_from_str(&raw_origin)? }, }; let data_raw = fields diff --git a/tests/collab/util.rs b/tests/collab/util.rs index 34527a389..50d25e048 100644 --- a/tests/collab/util.rs +++ b/tests/collab/util.rs @@ -136,9 +136,9 @@ impl TestScenario { pub async fn execute(&self, collab: CollabRef) -> String { let len = self.txns.len(); let start = Instant::now(); - for (i, t) in self.txns.iter().take(50_000).enumerate() { + for (i, t) in self.txns.iter().enumerate() { if i % 10_000 == 0 { - tracing::trace!("step #{}/{} - {:?}", i + 1, len, start.elapsed()); + tracing::info!("step #{}/{} - {:?}", i + 1, len, start.elapsed()); } let mut lock = collab.write().await; let collab = lock.borrow_mut();