Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 48462:c1b633db67fc
rust: Serializing a DirstateMap does not mutate it anymore
Differential Revision: https://phab.mercurial-scm.org/D11834
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 29 Nov 2021 17:37:08 +0100 |
parents | 434de12918fd |
children | 2097f63575a5 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Fri Nov 26 15:07:59 2021 +0100 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Nov 29 17:37:08 2021 +0100 @@ -195,7 +195,7 @@ p1: PyObject, p2: PyObject, ) -> PyResult<PyBytes> { - let mut inner = self.inner(py).borrow_mut(); + let inner = self.inner(py).borrow(); let parents = DirstateParents { p1: extract_node_id(py, &p1)?, p2: extract_node_id(py, &p2)?, @@ -217,7 +217,7 @@ &self, can_append: bool, ) -> PyResult<PyObject> { - let mut inner = self.inner(py).borrow_mut(); + let inner = self.inner(py).borrow(); let result = inner.pack_v2(can_append); match result { Ok((packed, tree_metadata, append)) => {