Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Horusiath committed Oct 23, 2024
1 parent 2acb557 commit 824cac6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/collab-rt-protocol/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions libs/collab-stream/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/collab/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 824cac6

Please sign in to comment.