diff rust/hg-cpython/src/dirstate/status.rs @ 51635:aa23b19e6da4

match: make `was_tampered_with` work recursively This is useful if we are to use it outside of Rust, when deciding whether or not to do some fast-path operation with a given matcher.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Fri, 26 Apr 2024 18:53:02 +0100
parents e4b9f8a74d5f
children 04b9a56c2d25
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/status.rs	Fri Apr 26 19:43:42 2024 +0100
+++ b/rust/hg-cpython/src/dirstate/status.rs	Fri Apr 26 18:53:02 2024 +0100
@@ -182,7 +182,7 @@
     matcher: PyObject,
 ) -> PyResult<Box<dyn Matcher + Sync>> {
     let tampered = matcher
-        .call_method(py, "was_tampered_with", PyTuple::empty(py), None)?
+        .call_method(py, "was_tampered_with_nonrec", PyTuple::empty(py), None)?
         .extract::<PyBool>(py)?
         .is_true();
     if tampered {