##// END OF EJS Templates
rust-index: optim note for post-scaffolding removal
Georges Racinet -
r52097:297fa956 default
parent child Browse files
Show More
@@ -96,6 +96,9 b' py_class!(pub class MixedIndex |py| {'
96
96
97 /// return True if the node exist in the index
97 /// return True if the node exist in the index
98 def has_node(&self, node: PyBytes) -> PyResult<bool> {
98 def has_node(&self, node: PyBytes) -> PyResult<bool> {
99 // TODO OPTIM we could avoid a needless conversion here,
100 // to do when scaffolding for pure Rust switch is removed,
101 // as `get_rev()` currently does the necessary assertions
99 self.get_rev(py, node).map(|opt| opt.is_some())
102 self.get_rev(py, node).map(|opt| opt.is_some())
100 }
103 }
101
104
General Comments 0
You need to be logged in to leave comments. Login now