rust/hg-cpython/src/ref_sharing.rs
changeset 42890 74d67c645278
parent 42889 ea91a126c803
child 42891 5ccc08d02280
--- a/rust/hg-cpython/src/ref_sharing.rs	Sun Sep 08 12:26:12 2019 +0900
+++ b/rust/hg-cpython/src/ref_sharing.rs	Sun Sep 08 13:08:59 2019 +0900
@@ -378,12 +378,12 @@
         impl $name {
             pub fn from_inner(
                 py: Python,
-                leaked: Option<$leaked>,
+                leaked: $leaked,
                 it: $iterator_type
             ) -> PyResult<Self> {
                 Self::create_instance(
                     py,
-                    RefCell::new(leaked),
+                    RefCell::new(Some(leaked)),
                     RefCell::new(it)
                 )
             }