# HG changeset patch # User Raphaël Gomès # Date 1688043646 -7200 # Node ID 8ade5e6cdb6101a4975abc454756a0042e60b598 # Parent a6e293b21743573085752b4f34dec651936493ef rust-mixed-index: rename variable to make the next change clearer We're going to add another mmap reference holder, so let's rename this one first. diff -r a6e293b21743 -r 8ade5e6cdb61 rust/hg-cpython/src/revlog.rs --- a/rust/hg-cpython/src/revlog.rs Wed Sep 27 10:08:32 2023 +0200 +++ b/rust/hg-cpython/src/revlog.rs Thu Jun 29 15:00:46 2023 +0200 @@ -39,7 +39,7 @@ data nt: RefCell>; data docket: RefCell>; // Holds a reference to the mmap'ed persistent nodemap data - data mmap: RefCell>; + data nodemap_mmap: RefCell>; def __new__(_cls, cindex: PyObject) -> PyResult { Self::new(py, cindex) @@ -175,7 +175,7 @@ def clearcaches(&self, *args, **kw) -> PyResult { self.nt(py).borrow_mut().take(); self.docket(py).borrow_mut().take(); - self.mmap(py).borrow_mut().take(); + self.nodemap_mmap(py).borrow_mut().take(); self.call_cindex(py, "clearcaches", args, kw) } @@ -447,7 +447,7 @@ // Keep a reference to the mmap'ed buffer, otherwise we get a dangling // pointer. - self.mmap(py).borrow_mut().replace(buf); + self.nodemap_mmap(py).borrow_mut().replace(buf); let mut nt = NodeTree::load_bytes(Box::new(bytes), len);