[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
@@ -111,7 +111,7 @@ impl FromStr for ExternalName {
|
||||
// Try to parse as a libcall name, otherwise it's a test case.
|
||||
match s.parse() {
|
||||
Ok(lc) => Ok(ExternalName::LibCall(lc)),
|
||||
Err(_) => Ok(ExternalName::testcase(s.as_bytes())),
|
||||
Err(_) => Ok(Self::testcase(s.as_bytes())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user