##// END OF EJS Templates
rust-index: moved constructor in separate impl block...
Georges Racinet -
r44990:887d0f92 default
parent child Browse files
Show More
@@ -28,8 +28,7 b' py_class!(pub class MixedIndex |py| {'
28 data cindex: RefCell<cindex::Index>;
28 data cindex: RefCell<cindex::Index>;
29
29
30 def __new__(_cls, cindex: PyObject) -> PyResult<MixedIndex> {
30 def __new__(_cls, cindex: PyObject) -> PyResult<MixedIndex> {
31 Self::create_instance(py, RefCell::new(
31 Self::new(py, cindex)
32 cindex::Index::new(py, cindex)?))
33 }
32 }
34
33
35 /// Compatibility layer used for Python consumers needing access to the C index
34 /// Compatibility layer used for Python consumers needing access to the C index
@@ -199,6 +198,13 b' py_class!(pub class MixedIndex |py| {'
199 });
198 });
200
199
201 impl MixedIndex {
200 impl MixedIndex {
201 fn new(py: Python, cindex: PyObject) -> PyResult<MixedIndex> {
202 Self::create_instance(
203 py,
204 RefCell::new(cindex::Index::new(py, cindex)?),
205 )
206 }
207
202 /// forward a method call to the underlying C index
208 /// forward a method call to the underlying C index
203 fn call_cindex(
209 fn call_cindex(
204 &self,
210 &self,
General Comments 0
You need to be logged in to leave comments. Login now