# HG changeset patch # User Georges Racinet # Date 2023-09-27 09:34:52 # Node ID 297fa956b6c4e328e8c66e3f14226380ca157efd # Parent 7434747343ab6205fe2938c7f64d7099a8b56c6f rust-index: optim note for post-scaffolding removal diff --git a/rust/hg-cpython/src/revlog.rs b/rust/hg-cpython/src/revlog.rs --- a/rust/hg-cpython/src/revlog.rs +++ b/rust/hg-cpython/src/revlog.rs @@ -96,6 +96,9 @@ py_class!(pub class MixedIndex |py| { /// return True if the node exist in the index def has_node(&self, node: PyBytes) -> PyResult { + // TODO OPTIM we could avoid a needless conversion here, + // to do when scaffolding for pure Rust switch is removed, + // as `get_rev()` currently does the necessary assertions self.get_rev(py, node).map(|opt| opt.is_some()) }