# HG changeset patch # User Georges Racinet # Date 1695807292 -7200 # Node ID 297fa956b6c4e328e8c66e3f14226380ca157efd # Parent 7434747343ab6205fe2938c7f64d7099a8b56c6f rust-index: optim note for post-scaffolding removal diff -r 7434747343ab -r 297fa956b6c4 rust/hg-cpython/src/revlog.rs --- a/rust/hg-cpython/src/revlog.rs Thu Nov 02 11:16:13 2023 +0100 +++ b/rust/hg-cpython/src/revlog.rs Wed Sep 27 11:34:52 2023 +0200 @@ -96,6 +96,9 @@ /// 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()) }