@@ -92,11 +92,12 @@ impl<'py, T: Integer, L: Integer, M: Integer, I: Integer, THETA: Integer, N: Int
9292}
9393
9494impl < ' py , T : Integer , L : Integer , M : Integer , I : Integer , THETA : Integer , N : Integer , J : Integer >
95- FromPyObject < ' py > for Quantity < f64 , SIUnit < T , L , M , I , THETA , N , J > >
95+ FromPyObject < ' _ , ' py > for Quantity < f64 , SIUnit < T , L , M , I , THETA , N , J > >
9696where
9797 Self : PrintUnit ,
9898{
99- fn extract_bound ( ob : & Bound < ' py , PyAny > ) -> PyResult < Self > {
99+ type Error = PyErr ;
100+ fn extract ( ob : Borrowed < ' _ , ' py , PyAny > ) -> PyResult < Self > {
100101 let Ok ( ( value, unit_from) ) = ob
101102 . call_method0 ( "__getnewargs__" )
102103 . and_then ( |raw| raw. extract :: < ( f64 , [ i8 ; 7 ] ) > ( ) )
@@ -131,11 +132,12 @@ impl<
131132 N : Integer ,
132133 J : Integer ,
133134 D : Dimension ,
134- > FromPyObject < ' py > for Quantity < Array < f64 , D > , SIUnit < T , L , M , I , THETA , N , J > >
135+ > FromPyObject < ' _ , ' py > for Quantity < Array < f64 , D > , SIUnit < T , L , M , I , THETA , N , J > >
135136where
136137 Self : PrintUnit ,
137138{
138- fn extract_bound ( ob : & Bound < ' py , PyAny > ) -> PyResult < Self > {
139+ type Error = PyErr ;
140+ fn extract ( ob : Borrowed < ' _ , ' py , PyAny > ) -> PyResult < Self > {
139141 let Ok ( ( value, unit_from) ) = ob
140142 . call_method0 ( "__getnewargs__" )
141143 . and_then ( |raw| raw. extract :: < ( PyReadonlyArray < f64 , D > , [ i8 ; 7 ] ) > ( ) )
@@ -162,11 +164,12 @@ where
162164
163165#[ cfg( feature = "nalgebra" ) ]
164166impl < ' py , T : Integer , L : Integer , M : Integer , I : Integer , THETA : Integer , N : Integer , J : Integer >
165- FromPyObject < ' py > for Quantity < DVector < f64 > , SIUnit < T , L , M , I , THETA , N , J > >
167+ FromPyObject < ' _ , ' py > for Quantity < DVector < f64 > , SIUnit < T , L , M , I , THETA , N , J > >
166168where
167169 Self : PrintUnit ,
168170{
169- fn extract_bound ( ob : & Bound < ' py , PyAny > ) -> PyResult < Self > {
171+ type Error = PyErr ;
172+ fn extract ( ob : Borrowed < ' _ , ' py , PyAny > ) -> PyResult < Self > {
170173 let Ok ( ( value, unit_from) ) = ob. call_method0 ( "__getnewargs__" ) . and_then ( |raw| {
171174 raw. extract :: < ( PyReadonlyArray1 < f64 > , [ i8 ; 7 ] ) > ( )
172175 . map ( |( m, u) | {
@@ -195,11 +198,12 @@ where
195198
196199#[ cfg( feature = "nalgebra" ) ]
197200impl < ' py , T : Integer , L : Integer , M : Integer , I : Integer , THETA : Integer , N : Integer , J : Integer >
198- FromPyObject < ' py > for Quantity < DMatrix < f64 > , SIUnit < T , L , M , I , THETA , N , J > >
201+ FromPyObject < ' _ , ' py > for Quantity < DMatrix < f64 > , SIUnit < T , L , M , I , THETA , N , J > >
199202where
200203 Self : PrintUnit ,
201204{
202- fn extract_bound ( ob : & Bound < ' py , PyAny > ) -> PyResult < Self > {
205+ type Error = PyErr ;
206+ fn extract ( ob : Borrowed < ' _ , ' py , PyAny > ) -> PyResult < Self > {
203207 let Ok ( ( value, unit_from) ) = ob. call_method0 ( "__getnewargs__" ) . and_then ( |raw| {
204208 raw. extract :: < ( PyReadonlyArray2 < f64 > , [ i8 ; 7 ] ) > ( )
205209 . map ( |( m, u) | {
@@ -245,8 +249,10 @@ impl<'py> IntoPyObject<'py> for Angle {
245249 }
246250}
247251
248- impl < ' py > FromPyObject < ' py > for Angle {
249- fn extract_bound ( ob : & Bound < ' py , PyAny > ) -> PyResult < Self > {
252+ impl < ' py > FromPyObject < ' _ , ' py > for Angle {
253+ type Error = PyErr ;
254+
255+ fn extract ( ob : Borrowed < ' _ , ' py , PyAny > ) -> PyResult < Self > {
250256 let Ok ( value) = ob
251257 . call_method0 ( "__getnewargs__" )
252258 . and_then ( |raw| raw. extract :: < f64 > ( ) )
0 commit comments