Skip to content

Commit

Permalink
convert match statement to if let
Browse files Browse the repository at this point in the history
  • Loading branch information
tobithiel committed Jan 13, 2020
1 parent 3441779 commit 21edd2a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1956,11 +1956,8 @@ impl<'test> TestCx<'test> {
rustc.arg("-Ctarget-feature=-crt-static");
}

match allow_unused {
AllowUnused::Yes => {
rustc.args(&["-A", "unused"]);
}
AllowUnused::No => {}
if let AllowUnused::Yes = allow_unused {
rustc.args(&["-A", "unused"]);
}

rustc.args(&self.props.compile_flags);
Expand Down

0 comments on commit 21edd2a

Please sign in to comment.