[clippy] Fix a few clippy issues in lib/codegen/;
- don't generate "&& true" when generating instruction eq() fn; - use more Self; - use subsec_millis instead of subsec_nanos and divide; - coalesce two ifs;
This commit is contained in:
committed by
Dan Gohman
parent
0616a960d6
commit
bcc268a3cd
@@ -69,10 +69,8 @@ impl<'a> LocationVerifier<'a> {
|
||||
let opcode = dfg[inst].opcode();
|
||||
if opcode.is_return() {
|
||||
self.check_return_abi(inst, &divert)?;
|
||||
} else if opcode.is_branch() {
|
||||
if !divert.is_empty() {
|
||||
self.check_cfg_edges(inst, &divert)?;
|
||||
}
|
||||
} else if opcode.is_branch() && !divert.is_empty() {
|
||||
self.check_cfg_edges(inst, &divert)?;
|
||||
}
|
||||
|
||||
self.update_diversions(inst, &mut divert)?;
|
||||
|
||||
Reference in New Issue
Block a user