Skip to content

Commit e71e6af

Browse files
andrewwhitecdwjohntmyers
authored andcommitted
fix(supervisor-network): resolve Clippy nonminimal_bool in port filter
Replace !p.as_u64().is_some_and(|n| n == 0) with the idiomatic p.as_u64().is_none_or(|n| n != 0) at normalize_endpoint_ports. This clears the required Branch Checks failure reported in the PR review. Signed-off-by: andrewwhitecdw <andrewwhitecdw@users.noreply.github.com>
1 parent 0719e35 commit e71e6af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/openshell-supervisor-network/src

‎crates/openshell-supervisor-network/src/opa.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ fn normalize_endpoint_ports(data: &mut serde_json::Value) {
12821282
// so downstream validation can fail closed on malformed input
12831283
// rather than silently dropping it.
12841284
if let Some(ports) = ep_obj.get_mut("ports").and_then(|v| v.as_array_mut()) {
1285-
ports.retain(|p| !p.as_u64().is_some_and(|n| n == 0));
1285+
ports.retain(|p| p.as_u64().is_none_or(|n| n != 0));
12861286
}
12871287

12881288
let has_ports = ep_obj

0 commit comments

Comments
 (0)