@@ -118,7 +118,7 @@ impl<'a, T: Inflate<'a>> Inflate<'a> for Vec<T> {
118118}
119119#[ cfg( feature = "py" ) ]
120120pub mod py {
121- use pyo3:: { types:: PyTuple , IntoPyObjectExt , PyObject , PyResult , Python } ;
121+ use pyo3:: { types:: PyTuple , IntoPyObjectExt , Py , PyAny , PyResult , Python } ;
122122
123123 // TODO: replace with upstream implementation once
124124 // https://github.com/PyO3/pyo3/issues/1813 is resolved
@@ -133,38 +133,38 @@ pub mod py {
133133 // }
134134 // }
135135
136- impl TryIntoPy < PyObject > for bool {
137- fn try_into_py ( self , py : Python ) -> PyResult < PyObject > {
136+ impl TryIntoPy < Py < PyAny > > for bool {
137+ fn try_into_py ( self , py : Python ) -> PyResult < Py < PyAny > > {
138138 self . into_py_any ( py)
139139 }
140140 }
141141
142- impl < T : TryIntoPy < PyObject > > TryIntoPy < PyObject > for Box < T >
142+ impl < T : TryIntoPy < Py < PyAny > > > TryIntoPy < Py < PyAny > > for Box < T >
143143 where
144- T : TryIntoPy < PyObject > ,
144+ T : TryIntoPy < Py < PyAny > > ,
145145 {
146- fn try_into_py ( self , py : Python ) -> PyResult < PyObject > {
146+ fn try_into_py ( self , py : Python ) -> PyResult < Py < PyAny > > {
147147 ( * self ) . try_into_py ( py)
148148 }
149149 }
150150
151- impl < T > TryIntoPy < PyObject > for Option < T >
151+ impl < T > TryIntoPy < Py < PyAny > > for Option < T >
152152 where
153- T : TryIntoPy < PyObject > ,
153+ T : TryIntoPy < Py < PyAny > > ,
154154 {
155- fn try_into_py ( self , py : Python ) -> PyResult < PyObject > {
155+ fn try_into_py ( self , py : Python ) -> PyResult < Py < PyAny > > {
156156 Ok ( match self {
157157 None => py. None ( ) ,
158158 Some ( x) => x. try_into_py ( py) ?,
159159 } )
160160 }
161161 }
162162
163- impl < T > TryIntoPy < PyObject > for Vec < T >
163+ impl < T > TryIntoPy < Py < PyAny > > for Vec < T >
164164 where
165- T : TryIntoPy < PyObject > ,
165+ T : TryIntoPy < Py < PyAny > > ,
166166 {
167- fn try_into_py ( self , py : Python ) -> PyResult < PyObject > {
167+ fn try_into_py ( self , py : Python ) -> PyResult < Py < PyAny > > {
168168 let converted = self
169169 . into_iter ( )
170170 . map ( |x| x. try_into_py ( py) )
@@ -174,8 +174,8 @@ pub mod py {
174174 }
175175 }
176176
177- impl < ' a > TryIntoPy < PyObject > for & ' a str {
178- fn try_into_py ( self , py : Python ) -> PyResult < PyObject > {
177+ impl < ' a > TryIntoPy < Py < PyAny > > for & ' a str {
178+ fn try_into_py ( self , py : Python ) -> PyResult < Py < PyAny > > {
179179 self . into_py_any ( py)
180180 }
181181 }
0 commit comments