Show More
@@ -909,10 +909,10 b' impl OwningDirstateMap {' | |||
|
909 | 909 | |
|
910 | 910 | #[timed] |
|
911 | 911 | pub fn pack_v1( |
|
912 |
& |
|
|
912 | &self, | |
|
913 | 913 | parents: DirstateParents, |
|
914 | 914 | ) -> Result<Vec<u8>, DirstateError> { |
|
915 |
let map = self.get_map |
|
|
915 | let map = self.get_map(); | |
|
916 | 916 | // Optizimation (to be measured?): pre-compute size to avoid `Vec` |
|
917 | 917 | // reallocations |
|
918 | 918 | let mut size = parents.as_bytes().len(); |
@@ -949,10 +949,10 b' impl OwningDirstateMap {' | |||
|
949 | 949 | /// (false). |
|
950 | 950 | #[timed] |
|
951 | 951 | pub fn pack_v2( |
|
952 |
& |
|
|
952 | &self, | |
|
953 | 953 | can_append: bool, |
|
954 | 954 | ) -> Result<(Vec<u8>, Vec<u8>, bool), DirstateError> { |
|
955 |
let map = self.get_map |
|
|
955 | let map = self.get_map(); | |
|
956 | 956 | on_disk::write(map, can_append) |
|
957 | 957 | } |
|
958 | 958 |
@@ -553,7 +553,7 b" pub(crate) fn for_each_tracked_path<'on_" | |||
|
553 | 553 | /// `dirstate_map.on_disk` (true), instead of written to a new data file |
|
554 | 554 | /// (false). |
|
555 | 555 | pub(super) fn write( |
|
556 |
dirstate_map: & |
|
|
556 | dirstate_map: &DirstateMap, | |
|
557 | 557 | can_append: bool, |
|
558 | 558 | ) -> Result<(Vec<u8>, Vec<u8>, bool), DirstateError> { |
|
559 | 559 | let append = can_append && dirstate_map.write_should_append(); |
@@ -195,7 +195,7 b' py_class!(pub class DirstateMap |py| {' | |||
|
195 | 195 | p1: PyObject, |
|
196 | 196 | p2: PyObject, |
|
197 | 197 | ) -> PyResult<PyBytes> { |
|
198 |
let |
|
|
198 | let inner = self.inner(py).borrow(); | |
|
199 | 199 | let parents = DirstateParents { |
|
200 | 200 | p1: extract_node_id(py, &p1)?, |
|
201 | 201 | p2: extract_node_id(py, &p2)?, |
@@ -217,7 +217,7 b' py_class!(pub class DirstateMap |py| {' | |||
|
217 | 217 | &self, |
|
218 | 218 | can_append: bool, |
|
219 | 219 | ) -> PyResult<PyObject> { |
|
220 |
let |
|
|
220 | let inner = self.inner(py).borrow(); | |
|
221 | 221 | let result = inner.pack_v2(can_append); |
|
222 | 222 | match result { |
|
223 | 223 | Ok((packed, tree_metadata, append)) => { |
General Comments 0
You need to be logged in to leave comments.
Login now