File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,11 @@ impl CertificateRevocationList {
138
138
}
139
139
}
140
140
141
- fn __getitem__ (
141
+ fn __getitem__ < ' p > (
142
142
& self ,
143
- py : pyo3:: Python < ' _ > ,
143
+ py : pyo3:: Python < ' p > ,
144
144
idx : pyo3:: Bound < ' _ , pyo3:: PyAny > ,
145
- ) -> pyo3:: PyResult < pyo3:: PyObject > {
145
+ ) -> pyo3:: PyResult < pyo3:: Bound < ' p , pyo3 :: PyAny > > {
146
146
self . revoked_certs . get_or_init ( py, || {
147
147
let mut revoked_certs = vec ! [ ] ;
148
148
let mut it = self . __iter__ ( ) ;
@@ -161,7 +161,7 @@ impl CertificateRevocationList {
161
161
let revoked_cert = pyo3:: Bound :: new ( py, self . revoked_cert ( py, i as usize ) ) ?;
162
162
result. append ( revoked_cert) ?;
163
163
}
164
- Ok ( result. into_any ( ) . unbind ( ) )
164
+ Ok ( result. into_any ( ) )
165
165
} else {
166
166
let mut idx = idx. extract :: < isize > ( ) ?;
167
167
if idx < 0 {
@@ -170,9 +170,7 @@ impl CertificateRevocationList {
170
170
if idx >= ( self . len ( ) as isize ) || idx < 0 {
171
171
return Err ( pyo3:: exceptions:: PyIndexError :: new_err ( ( ) ) ) ;
172
172
}
173
- Ok ( pyo3:: Bound :: new ( py, self . revoked_cert ( py, idx as usize ) ) ?
174
- . into_any ( )
175
- . unbind ( ) )
173
+ Ok ( pyo3:: Bound :: new ( py, self . revoked_cert ( py, idx as usize ) ) ?. into_any ( ) )
176
174
}
177
175
}
178
176
You can’t perform that action at this time.
0 commit comments