diff --git a/rust/hg-cpython/src/dirstate/dirs_multiset.rs b/rust/hg-cpython/src/dirstate/dirs_multiset.rs --- a/rust/hg-cpython/src/dirstate/dirs_multiset.rs +++ b/rust/hg-cpython/src/dirstate/dirs_multiset.rs @@ -90,10 +90,10 @@ py_class!(pub class Dirs |py| { } def __iter__(&self) -> PyResult { let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; - DirsMultisetKeysIterator::create_instance( + DirsMultisetKeysIterator::from_inner( py, - RefCell::new(Some(leak_handle)), - RefCell::new(leaked_ref.iter()), + leak_handle, + leaked_ref.iter(), ) } diff --git a/rust/hg-cpython/src/ref_sharing.rs b/rust/hg-cpython/src/ref_sharing.rs --- a/rust/hg-cpython/src/ref_sharing.rs +++ b/rust/hg-cpython/src/ref_sharing.rs @@ -309,10 +309,10 @@ macro_rules! py_shared_ref { /// /// def __iter__(&self) -> PyResult { /// let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; -/// MyTypeItemsIterator::create_instance( +/// MyTypeItemsIterator::from_inner( /// py, -/// RefCell::new(Some(leak_handle)), -/// RefCell::new(leaked_ref.iter()), +/// leak_handle, +/// leaked_ref.iter(), /// ) /// } /// });