File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pub fn run_relax<W1: WriteColor, W2: WriteColor>(
4040 Ok ( report) => {
4141 if report. is_empty ( ) {
4242 let _ = writeln ! ( stdout, "No violations to relax" ) ;
43- return ExitStatus :: Failure ;
43+ return ExitStatus :: Success ;
4444 }
4545 let _ = write_report ( stdout, & report) ;
4646 ExitStatus :: Success
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ max_lines = 700
121121}
122122
123123#[ test]
124- fn exits_one_when_no_violations ( ) {
124+ fn exits_zero_when_no_violations ( ) {
125125 let temp = TempDir :: new ( ) . unwrap ( ) ;
126126 write_file ( & temp, "src/small.rs" , & repeat_lines ( 10 ) ) ;
127127
@@ -131,7 +131,7 @@ fn exits_one_when_no_violations() {
131131 . output ( )
132132 . unwrap ( ) ;
133133
134- assert_eq ! ( output. status. code ( ) , Some ( 1 ) ) ;
134+ assert ! ( output. status. success ( ) ) ;
135135 let stdout = strip_ansi ( & String :: from_utf8_lossy ( & output. stdout ) ) ;
136136 assert ! ( stdout. contains( "No violations to relax" ) ) ;
137137}
You can’t perform that action at this time.
0 commit comments