#31820 - Utilize if..let instead of single match branch

This commit is contained in:
dileepb 2016-02-23 21:18:07 +05:30
parent 6ffd7cd166
commit fbfe70e6ab
9 changed files with 28 additions and 42 deletions

View file

@ -385,9 +385,8 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
*s.borrow_mut() = analysis.take();
});
match matches.opt_str("crate-name") {
Some(name) => krate.name = name,
None => {}
if let Some(name) = matches.opt_str("crate-name") {
krate.name = name
}
// Process all of the crate attributes, extracting plugin metadata along