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 {
65
65
66
66
/// Cleanup the device following a test
67
67
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 )
75
69
}
76
70
}
77
71
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ fn run_tests(tests: &[(&str, TestFn)]) {
43
43
res
44
44
} ;
45
45
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
+ }
47
50
48
51
if let Err ( err) = res {
49
52
let err = if let Some ( err) = err. downcast_ref :: < & ' static str > ( ) {
You can’t perform that action at this time.
0 commit comments