Skip to content

Commit d71bb7c

Browse files
committed
chore: clippy fix
1 parent ee36ab4 commit d71bb7c

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

collab-plugins/src/local_storage/rocksdb/rocksdb_plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl CollabPlugin for RocksdbDiskPlugin {
132132
object_id: &str,
133133
_txn: &TransactionMut,
134134
update: &[u8],
135-
collab_version: Option<&CollabVersion>,
135+
_collab_version: Option<&CollabVersion>,
136136
) {
137137
// Only push update if the doc is loaded
138138
if !self.did_init.load(SeqCst) {

collab/src/core/collab.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,8 @@ impl DataSource {
703703
pub fn version(&self) -> Option<CollabVersion> {
704704
match self {
705705
DataSource::Disk(_) => None,
706-
DataSource::DocStateV1(d) => d.version.clone(),
707-
DataSource::DocStateV2(d) => d.version.clone(),
706+
DataSource::DocStateV1(d) => d.version,
707+
DataSource::DocStateV2(d) => d.version,
708708
}
709709
}
710710

collab/src/entity.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ impl EncodedCollab {
5959
}
6060
}
6161

62+
pub fn versioned_data(self) -> VersionedData {
63+
VersionedData::new(self.doc_state, self.collab_version)
64+
}
65+
6266
pub fn encode_to_bytes(&self) -> Result<Vec<u8>, bincode::Error> {
6367
bincode::serialize(self)
6468
}

collab/tests/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl CollabStateCachePlugin {
5858
.unwrap();
5959
Ok(DataSource::DocStateV1(VersionedData::new(
6060
doc_state,
61-
lock.version.clone(),
61+
lock.version,
6262
)))
6363
}
6464

0 commit comments

Comments
 (0)