File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,7 @@ impl DeviceHandles {
6565
6666 /// Cleanup the device following a test
6767 pub fn post_test ( & mut self ) -> rusb:: Result < ( ) > {
68- let res = self . release_interface ( TEST_INTERFACE ) ;
69- if let Err ( err) = res {
70- println ! ( "Failed to release interface: {}" , err) ;
71- return res;
72- }
73-
74- Ok ( ( ) )
68+ self . release_interface ( TEST_INTERFACE )
7569 }
7670}
7771
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ fn run_tests(tests: &[(&str, TestFn)]) {
4343 res
4444 } ;
4545
46- ctx. cleanup_after_test ( ) . expect ( "post test cleanup failed" ) ;
46+ if let Err ( err) = ctx. cleanup_after_test ( ) {
47+ println ! ( "Failed to release interface: {}" , err) ;
48+ panic ! ( "post test cleanup failed" ) ;
49+ }
4750
4851 if let Err ( err) = res {
4952 let err = if let Some ( err) = err. downcast_ref :: < & ' static str > ( ) {
You can’t perform that action at this time.
0 commit comments