Skip to content

Commit 21edd2a

Browse files
committed
convert match statement to if let
1 parent 3441779 commit 21edd2a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,11 +1956,8 @@ impl<'test> TestCx<'test> {
19561956
rustc.arg("-Ctarget-feature=-crt-static");
19571957
}
19581958

1959-
match allow_unused {
1960-
AllowUnused::Yes => {
1961-
rustc.args(&["-A", "unused"]);
1962-
}
1963-
AllowUnused::No => {}
1959+
if let AllowUnused::Yes = allow_unused {
1960+
rustc.args(&["-A", "unused"]);
19641961
}
19651962

19661963
rustc.args(&self.props.compile_flags);

0 commit comments

Comments
 (0)