@@ -50,8 +50,8 @@ impl EventLoop {
50
50
let ( notify_receiver, notify_sender) =
51
51
sys_pipe ( ) . map_err ( |err| format ! ( "Could not create pipe: {}" , err) ) ?;
52
52
53
- call_user_func ! ( Function :: try_from_function( "class_exists" ) . unwrap( ) , "\\ Revolt\\ EventLoop" ) . unwrap ( ) ;
54
- call_user_func ! ( Function :: try_from_function( "interface_exists" ) . unwrap( ) , "\\ Revolt\\ EventLoop\\ Suspension" ) . unwrap ( ) ;
53
+ call_user_func ! ( Function :: try_from_function( "class_exists" ) . unwrap( ) , "\\ Revolt\\ EventLoop" ) ? ;
54
+ call_user_func ! ( Function :: try_from_function( "interface_exists" ) . unwrap( ) , "\\ Revolt\\ EventLoop\\ Suspension" ) ? ;
55
55
56
56
Ok ( Self {
57
57
fibers : ZendHashTable :: new ( ) ,
@@ -60,9 +60,9 @@ impl EventLoop {
60
60
notify_sender : unsafe { File :: from_raw_fd ( notify_sender) } ,
61
61
notify_receiver : unsafe { File :: from_raw_fd ( notify_receiver) } ,
62
62
dummy : [ 0 ; 1 ] ,
63
- get_current_suspension : Function :: try_from_method ( "\\ Revolt\\ EventLoop" , "getSuspension" ) . unwrap ( ) ,
64
- suspend : Function :: try_from_method ( "\\ Revolt\\ EventLoop\\ Suspension" , "suspend" ) . unwrap ( ) ,
65
- resume : Function :: try_from_method ( "\\ Revolt\\ EventLoop\\ Suspension" , "resume" ) . unwrap ( )
63
+ get_current_suspension : Function :: try_from_method ( "\\ Revolt\\ EventLoop" , "getSuspension" ) . ok_or ( " \\ Revolt \\ EventLoop::getSuspension does not exist" ) ? ,
64
+ suspend : Function :: try_from_method ( "\\ Revolt\\ EventLoop\\ Suspension" , "suspend" ) . ok_or ( " \\ Revolt \\ Suspension::suspend does not exist" ) ? ,
65
+ resume : Function :: try_from_method ( "\\ Revolt\\ EventLoop\\ Suspension" , "resume" ) . ok_or ( " \\ Revolt \\ Suspension::resume does not exist" ) ?
66
66
} )
67
67
}
68
68
0 commit comments