Skip to content

Commit

Permalink
Fix cargo clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Gris Ge <[email protected]>
  • Loading branch information
cathay4t committed Apr 9, 2024
1 parent cd2dcd5 commit 8b90890
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions examples/dump_links_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async fn main() -> Result<(), String> {

// Spawn the `Connection` so that it starts polling the netlink
// socket in the background.
let _ = async_std::task::spawn(conn);
async_std::task::spawn(conn);

// Create the netlink message that requests the links to be dumped
let mut nl_hdr = NetlinkHeader::default();
Expand All @@ -36,12 +36,8 @@ async fn main() -> Result<(), String> {
.map_err(|e| format!("Failed to send request: {}", e))?;

// Print all the messages received in response
loop {
if let Some(packet) = response.next().await {
println!("<<< {:?}", packet);
} else {
break;
}
while let Some(packet) = response.next().await {
println!("<<< {:?}", packet);
}

Ok(())
Expand Down

0 comments on commit 8b90890

Please sign in to comment.