File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ async fn main() -> Result<(), String> {
2020
2121 // Spawn the `Connection` so that it starts polling the netlink
2222 // socket in the background.
23- let _ = async_std:: task:: spawn ( conn) ;
23+ async_std:: task:: spawn ( conn) ;
2424
2525 // Create the netlink message that requests the links to be dumped
2626 let mut nl_hdr = NetlinkHeader :: default ( ) ;
@@ -36,12 +36,8 @@ async fn main() -> Result<(), String> {
3636 . map_err ( |e| format ! ( "Failed to send request: {}" , e) ) ?;
3737
3838 // Print all the messages received in response
39- loop {
40- if let Some ( packet) = response. next ( ) . await {
41- println ! ( "<<< {:?}" , packet) ;
42- } else {
43- break ;
44- }
39+ while let Some ( packet) = response. next ( ) . await {
40+ println ! ( "<<< {:?}" , packet) ;
4541 }
4642
4743 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments