Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
clippy: ethtool
Browse files Browse the repository at this point in the history
  • Loading branch information
little-dude committed Feb 20, 2022
1 parent c240fc4 commit 019fedd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 17 deletions.
4 changes: 1 addition & 3 deletions ethtool/examples/dump_coalesce.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT

use ethtool;
use futures::stream::TryStreamExt;
use tokio;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand All @@ -24,7 +22,7 @@ async fn get_coalesce(iface_name: Option<&str>) {
while let Some(msg) = coalesce_handle.try_next().await.unwrap() {
msgs.push(msg);
}
assert!(msgs.len() > 0);
assert!(!msgs.is_empty());
for msg in msgs {
println!("{:?}", msg);
}
Expand Down
4 changes: 1 addition & 3 deletions ethtool/examples/dump_features.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT

use ethtool;
use futures::stream::TryStreamExt;
use tokio;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand All @@ -24,7 +22,7 @@ async fn get_feature(iface_name: Option<&str>) {
while let Some(msg) = feature_handle.try_next().await.unwrap() {
msgs.push(msg);
}
assert!(msgs.len() > 0);
assert!(!msgs.is_empty());
for msg in msgs {
println!("{:?}", msg);
}
Expand Down
4 changes: 1 addition & 3 deletions ethtool/examples/dump_link_mode.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT

use ethtool;
use futures::stream::TryStreamExt;
use tokio;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand All @@ -24,7 +22,7 @@ async fn get_link_mode(iface_name: Option<&str>) {
while let Some(msg) = link_mode_handle.try_next().await.unwrap() {
msgs.push(msg);
}
assert!(msgs.len() > 0);
assert!(!msgs.is_empty());
for msg in msgs {
println!("{:?}", msg);
}
Expand Down
5 changes: 1 addition & 4 deletions ethtool/examples/dump_pause.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// SPDX-License-Identifier: MIT

use env_logger;
use ethtool;
use futures::stream::TryStreamExt;
use tokio;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand All @@ -26,6 +23,6 @@ async fn get_pause(iface_name: Option<&str>) {
while let Some(msg) = pause_handle.try_next().await.unwrap() {
msgs.push(msg);
}
assert!(msgs.len() > 0);
assert!(!msgs.is_empty());
println!("{:?}", msgs);
}
4 changes: 1 addition & 3 deletions ethtool/examples/dump_rings.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT

use ethtool;
use futures::stream::TryStreamExt;
use tokio;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand All @@ -24,7 +22,7 @@ async fn get_ring(iface_name: Option<&str>) {
while let Some(msg) = ring_handle.try_next().await.unwrap() {
msgs.push(msg);
}
assert!(msgs.len() > 0);
assert!(!msgs.is_empty());
for msg in msgs {
println!("{:?}", msg);
}
Expand Down
2 changes: 1 addition & 1 deletion ethtool/tests/dump_link_modes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async fn dump_link_modes() {
while let Some(msg) = link_modes_handle.try_next().await.unwrap() {
msgs.push(msg);
}
assert!(msgs.len() >= 1);
assert!(!msgs.is_empty());
let ethtool_msg = &msgs[0].payload;
println!("ethtool_msg {:?}", &ethtool_msg);

Expand Down

0 comments on commit 019fedd

Please sign in to comment.