File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,7 @@ struct SingleDispatchState {
7575impl SingleDispatchState {
7676 fn find_impl ( & mut self , py : Python , cls : Bound < ' _ , PyAny > ) -> PyResult < PyObject > {
7777 let cls_mro = get_obj_mro ( & cls. clone ( ) ) ?;
78- let mro = match compose_mro ( py, cls. clone ( ) , self . registry . keys ( ) ) {
79- Ok ( mro) => mro,
80- Err ( e) => return Err ( e) ,
81- } ;
78+ let mro = compose_mro ( py, cls. clone ( ) , self . registry . keys ( ) ) ?;
8279 let mut mro_match: Option < PyTypeReference > = None ;
8380 eprintln ! ( "Finding impl for {cls}" ) ;
8481 for typ in mro. iter ( ) {
@@ -136,10 +133,7 @@ impl SingleDispatchState {
136133 None => {
137134 let handler_for_cls = match self . registry . get ( & type_reference) {
138135 Some ( handler) => handler. clone_ref ( py) ,
139- None => match self . find_impl ( py, free_cls. bind ( py) . clone ( ) ) {
140- Ok ( handler) => handler,
141- Err ( e) => return Err ( e) ,
142- } ,
136+ None => self . find_impl ( py, free_cls. bind ( py) . clone ( ) ) ?,
143137 } ;
144138 self . cache
145139 . insert ( type_reference, handler_for_cls. clone_ref ( py) ) ;
You can’t perform that action at this time.
0 commit comments