fix(tests): resolve all clippy warnings for CI compliance
- Remove needless borrows on format!() in set_body_string() calls (needless_borrows_for_generic_args) - Replace assert!(false, ...) with collected assertion (assertions_on_constants + never_loop) - Use direct Method::POST comparison instead of to_string() (cmp_owned) - Simplify negated equality to != operator (nonminimal_bool) CI pipeline now passes with -D warnings enabled
This commit is contained in:
@ -245,7 +245,7 @@ fn test_ip_addresses_are_unicast() {
|
||||
|
||||
// Not unspecified (0.0.0.0)
|
||||
assert!(
|
||||
!(parts == vec![0, 0, 0, 0]),
|
||||
parts != vec![0, 0, 0, 0],
|
||||
"Address '{}' is unspecified",
|
||||
addr
|
||||
);
|
||||
@ -492,7 +492,7 @@ fn test_cross_distro_os_release_parsing() {
|
||||
parsed.contains_key("NAME"),
|
||||
"os-release must contain NAME field"
|
||||
);
|
||||
assert!(parsed["NAME"].ne(&""), "NAME should not be empty");
|
||||
assert!(!parsed["NAME"].is_empty(), "NAME should not be empty");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user