graphgate icon indicating copy to clipboard operation
graphgate copied to clipboard

eliminate warnings of clippy

Open developerworks opened this issue 3 years ago • 0 comments
trafficstars

length comparison to zero
`#[warn(clippy::[len_zero](https://rust-lang.github.io/rust-clippy/master/index.html#len_zero))]` on by default
for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zeroclippylen_zero
k8s.rs(33, 11): using `!is_empty` is clearer and more explicit: `!gateway_name.is_empty()`
called `map(..).flatten()` on an `Iterator`
`#[warn(clippy::[map_flatten](https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten))]` on by default
for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flattenclippymap_flatten
k8s.rs(73, 24): try using `flat_map` instead: `.flat_map(|spec| spec.ports.iter())`

developerworks avatar May 01 '22 13:05 developerworks