diff -r 96e05f1a99bd -r f94c10334bcb rust/hg-cpython/src/revlog.rs --- a/rust/hg-cpython/src/revlog.rs Sun Oct 29 23:54:05 2023 +0100 +++ b/rust/hg-cpython/src/revlog.rs Sun Oct 29 12:18:03 2023 +0100 @@ -40,7 +40,7 @@ py: Python, index: PyObject, ) -> PyResult> { - let midx = index.extract::(py)?; + let midx = index.extract::(py)?; let leaked = midx.index(py).leak_immutable(); Ok(unsafe { leaked.map(py, |idx| PySharedIndex { inner: idx }) }) } @@ -85,7 +85,7 @@ } } -py_class!(pub class MixedIndex |py| { +py_class!(pub class Index |py| { @shared data index: hg::index::Index; data nt: RefCell>; data docket: RefCell>; @@ -98,7 +98,7 @@ _cls, data: PyObject, default_header: u32, - ) -> PyResult { + ) -> PyResult { Self::new(py, data, default_header) } @@ -598,8 +598,8 @@ } } -impl MixedIndex { - fn new(py: Python, data: PyObject, header: u32) -> PyResult { +impl Index { + fn new(py: Python, data: PyObject, header: u32) -> PyResult { // Safety: we keep the buffer around inside the class as `index_mmap` let (buf, bytes) = unsafe { mmap_keeparound(py, data)? }; @@ -1108,7 +1108,7 @@ m.add(py, "__package__", package)?; m.add(py, "__doc__", "RevLog - Rust implementations")?; - m.add_class::(py)?; + m.add_class::(py)?; m.add_class::(py)?; let sys = PyModule::import(py, "sys")?;