diff rust/hg-pyo3/src/exceptions.rs @ 52780:42b219a1404a

rust-pyo3-revlog: InnerRevlog definition and constructor We felt that the `mmap_keeparound` naming was after all inappropriate: - it does nothing to keep the data alive. Instead, it requires the caller to keep it alive. - using it for mmap'ed data is certainly the main use case, but more generally, it is about extracting any Python buffer for direct usage as a bytes slice. Everything else is rather straightforward. This object has several layers of inner mutability, like its progenitor in `hg-cpython`.
author Georges Racinet <georges.racinet@cloudcrane.io>
date Wed, 25 Dec 2024 13:29:56 +0100
parents 32008b1e7104
children 918239b55b3a
line wrap: on
line diff
--- a/rust/hg-pyo3/src/exceptions.rs	Wed Dec 25 12:43:45 2024 +0100
+++ b/rust/hg-pyo3/src/exceptions.rs	Wed Dec 25 13:29:56 2024 +0100
@@ -48,7 +48,6 @@
     pyo3::import_exception!(mercurial.error, RevlogError);
 }
 
-#[allow(dead_code)]
 pub fn revlog_error_from_msg(e: impl ToString) -> PyErr {
     mercurial_py_errors::RevlogError::new_err(e.to_string().into_bytes())
 }