diff rust/hg-cpython/src/discovery.rs @ 42735:5154701a5413

rust-discovery: accept the new 'respectsize' init arg At this stage, we don't do anything about it: it will be meaningful in sampling methods that aren't implemented yet. Differential Revision: https://phab.mercurial-scm.org/D6516
author Georges Racinet <georges.racinet@octobus.net>
date Wed, 12 Jun 2019 14:18:12 +0100
parents 326fdce22fb2
children b6f3f704a561
line wrap: on
line diff
--- a/rust/hg-cpython/src/discovery.rs	Wed Aug 14 09:22:54 2019 +0900
+++ b/rust/hg-cpython/src/discovery.rs	Wed Jun 12 14:18:12 2019 +0100
@@ -29,10 +29,14 @@
 py_class!(pub class PartialDiscovery |py| {
     data inner: RefCell<Box<CorePartialDiscovery<Index>>>;
 
+    // `_respectsize` is currently only here to replicate the Python API and
+    // will be used in future patches inside methods that are yet to be
+    // implemented.
     def __new__(
         _cls,
         index: PyObject,
-        targetheads: PyObject
+        targetheads: PyObject,
+        _respectsize: bool
     ) -> PyResult<PartialDiscovery> {
         Self::create_instance(
             py,