rust/hg-core/src/dirstate_tree/dirstate_map.rs
changeset 48416 c1b633db67fc
parent 48392 434de12918fd
child 48421 2097f63575a5
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Fri Nov 26 15:07:59 2021 +0100
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Mon Nov 29 17:37:08 2021 +0100
@@ -909,10 +909,10 @@
 
     #[timed]
     pub fn pack_v1(
-        &mut self,
+        &self,
         parents: DirstateParents,
     ) -> Result<Vec<u8>, DirstateError> {
-        let map = self.get_map_mut();
+        let map = self.get_map();
         // Optizimation (to be measured?): pre-compute size to avoid `Vec`
         // reallocations
         let mut size = parents.as_bytes().len();
@@ -949,10 +949,10 @@
     /// (false).
     #[timed]
     pub fn pack_v2(
-        &mut self,
+        &self,
         can_append: bool,
     ) -> Result<(Vec<u8>, Vec<u8>, bool), DirstateError> {
-        let map = self.get_map_mut();
+        let map = self.get_map();
         on_disk::write(map, can_append)
     }