Enable and fix several more clippy lints.

This commit is contained in:
Dan Gohman
2018-04-02 08:48:06 -07:00
parent 5c6cb202d8
commit bf597b7abf
71 changed files with 360 additions and 219 deletions

View File

@@ -244,9 +244,9 @@ impl<'a> Verifier<'a> {
let fixed_results = inst_data.opcode().constraints().fixed_results();
// var_results is 0 if we aren't a call instruction
let var_results = dfg.call_signature(inst)
.map(|sig| dfg.signatures[sig].returns.len())
.unwrap_or(0);
let var_results = dfg.call_signature(inst).map_or(0, |sig| {
dfg.signatures[sig].returns.len()
});
let total_results = fixed_results + var_results;
// All result values for multi-valued instructions are created