rust-index: optim note for post-scaffolding removal
authorGeorges Racinet <georges.racinet@octobus.net>
Wed, 27 Sep 2023 11:34:52 +0200
changeset 51204 297fa956b6c4
parent 51203 7434747343ab
child 51205 002b49905aac
rust-index: optim note for post-scaffolding removal
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<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())
     }