changeset 51225:297fa956b6c4

rust-index: optim note for post-scaffolding removal
author Georges Racinet <georges.racinet@octobus.net>
date Wed, 27 Sep 2023 11:34:52 +0200
parents 7434747343ab
children 002b49905aac
files rust/hg-cpython/src/revlog.rs
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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<bool> {
+        // 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())
     }