File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
collab-plugins/src/local_storage/rocksdb Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments