File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed
Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -151,23 +151,10 @@ struct TestEffIO;
151151
152152define_test_type ! { TestEffIO A }
153153
154- struct GluonTestable < F > ( F ) ;
155-
156- impl < F > tensile:: Testable for GluonTestable < F >
157- where
158- F : Future < Output = Result < ( ) , Error > > + Send + ' static ,
159- {
160- type Error = Error ;
161-
162- fn test ( self ) -> tensile:: TestFuture < Self :: Error > {
163- tensile:: Future ( self . 0 ) . test ( )
164- }
165- }
166-
167154fn make_tensile_test ( name : String , test : TestFn ) -> tensile:: Test < Error > {
168155 let mut test = :: std:: panic:: AssertUnwindSafe ( test) ;
169156 tensile:: test ( name, {
170- GluonTestable ( :: std:: panic:: AssertUnwindSafe ( async move {
157+ tensile :: Future ( :: std:: panic:: AssertUnwindSafe ( async move {
171158 let test = test. call_async ( ( ) ) . await ?;
172159 let action = test. vm ( ) . get_global ( "std.test.run_io" ) ?;
173160 let mut action: OwnedFunction < fn ( OpaqueValue < RootedThread , TestEffIO > ) -> IO < ( ) > > =
Original file line number Diff line number Diff line change @@ -1260,15 +1260,15 @@ impl ThreadInternal for Thread {
12601260 ) ;
12611261 e. call_state = ExternCallState :: Poll
12621262 }
1263- _ => unreachable ! ( "{:#?}" , frame . state ) ,
1263+ _ => ( ) ,
12641264 }
12651265 }
12661266 }
12671267 if context. stack . get_frames ( ) . len ( ) == 1 {
12681268 // Only the top level frame left means that the thread has finished
12691269 return Err ( Error :: Dead ) . into ( ) ;
12701270 }
1271- context = ready ! ( context. execute( cx) ) ?. unwrap ( ) ;
1271+ context = ready ! ( context. execute( cx) ) ?. expect ( "Resume called on the top frame" ) ;
12721272 Ok ( context) . into ( )
12731273 }
12741274
You can’t perform that action at this time.
0 commit comments