Fixing a couple clippy warnings : #392

This commit is contained in:
ms2300
2018-08-17 11:13:06 -06:00
committed by Dan Gohman
parent 37272f5ceb
commit 30d09cf6b0
4 changed files with 15 additions and 16 deletions

View File

@@ -51,10 +51,10 @@ impl SubTest for TestVerifier {
}
match verify_function(func, context.flags_or_isa()) {
Ok(()) if expected.len() == 0 => Ok(()),
Ok(()) if expected.is_empty() => Ok(()),
Ok(()) => Err(format!("passed, but expected errors: {:?}", expected)),
Err(ref errors) if expected.len() == 0 => {
Err(ref errors) if expected.is_empty() => {
Err(format!("expected no error, but got:\n{}", errors))
}
@@ -78,7 +78,7 @@ impl SubTest for TestVerifier {
}
}
if msg.len() == 0 {
if msg.is_empty() {
Ok(())
} else {
Err(msg)