Fix clippy suggestions

This commit is contained in:
David Peter committed 2022-05-22 21:48:40 +02:00
1 parent 0ae89168ad
commit 1fb5263c3b
2 files changed
+11 -37

No files matched your search

+2 -10
View File
@@ -612,16 +612,8 @@ fn test_process_sign() {
fn test_parse_as_hex() {
assert_eq!(try_parse_as_hex_number("73"), None);
assert_eq!(try_parse_as_hex_number("0x1337"), Some(Ok(0x1337)));
assert!(if let Some(Err(_)) = try_parse_as_hex_number("0xnope") {
true
} else {
false
});
assert!(if let Some(Err(_)) = try_parse_as_hex_number("0x-1") {
true
} else {
false
});
assert!(matches!(try_parse_as_hex_number("0xnope"), Some(Err(_))));
assert!(matches!(try_parse_as_hex_number("0x-1"), Some(Err(_))));
}
#[test]