File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/tools/miri/tests/utils Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,9 @@ pub mod epoll {
107107 events : event. events . cast_unsigned ( ) ,
108108 u64 : event. data . try_into ( ) . unwrap ( ) ,
109109 } ;
110- errno_result ( unsafe { libc:: epoll_ctl ( epfd, op, fd, & raw mut event) } )
111- . map ( |r| assert_eq ! ( r, 0 ) )
110+ let ret = errno_result ( unsafe { libc:: epoll_ctl ( epfd, op, fd, & raw mut event) } ) ?;
111+ assert_eq ! ( ret, 0 ) ;
112+ Ok ( ( ) )
112113 }
113114
114115 /// Helper for the common case of adding an FD to an epoll with the FD itself being
@@ -124,7 +125,7 @@ pub mod epoll {
124125 let num = errno_result ( unsafe {
125126 libc:: epoll_wait ( epfd, array. as_mut_ptr ( ) , N . try_into ( ) . unwrap ( ) , 0 )
126127 } )
127- . unwrap ( ) ;
128+ . expect ( "epoll_wait returned an error" ) ;
128129 let got = & mut array[ ..num. try_into ( ) . unwrap ( ) ] ;
129130 let got = got
130131 . iter ( )
You can’t perform that action at this time.
0 commit comments