File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -368,16 +368,24 @@ impl<'a> NetworkInterface<'a> {
368368 feature = "virtio-net" ,
369369 ) ) ]
370370 fn handle_interrupt ( & mut self ) {
371- #[ cfg( feature = "net-trace" ) ]
372- self . device . get_mut ( ) . handle_interrupt ( ) ;
373- #[ cfg( not( feature = "net-trace" ) ) ]
374- self . device . handle_interrupt ( ) ;
371+ cfg_select ! {
372+ feature = "net-trace" => {
373+ self . device. get_mut( ) . handle_interrupt( ) ;
374+ }
375+ _ => {
376+ self . device. handle_interrupt( ) ;
377+ }
378+ }
375379 }
376380
377381 pub ( crate ) fn set_polling_mode ( & mut self , value : bool ) {
378- #[ cfg( feature = "net-trace" ) ]
379- self . device . get_mut ( ) . set_polling_mode ( value) ;
380- #[ cfg( not( feature = "net-trace" ) ) ]
381- self . device . set_polling_mode ( value) ;
382+ cfg_select ! {
383+ feature = "net-trace" => {
384+ self . device. get_mut( ) . set_polling_mode( value) ;
385+ }
386+ _ => {
387+ self . device. set_polling_mode( value) ;
388+ }
389+ }
382390 }
383391}
You can’t perform that action at this time.
0 commit comments