@@ -166,7 +166,7 @@ impl Spirc {
166166 }
167167
168168 let spirc_id = SPIRC_COUNTER . fetch_add ( 1 , Ordering :: AcqRel ) ;
169- debug ! ( "new Spirc[{}]" , spirc_id ) ;
169+ debug ! ( "new Spirc[{spirc_id }]" ) ;
170170
171171 let connect_state = ConnectState :: new ( config, & session) ;
172172
@@ -446,14 +446,14 @@ impl SpircTask {
446446 cluster_update = self . connect_state_update. next( ) => unwrap! {
447447 cluster_update,
448448 match |cluster_update| if let Err ( e) = self . handle_cluster_update( cluster_update) . await {
449- error!( "could not dispatch connect state update: {}" , e ) ;
449+ error!( "could not dispatch connect state update: {e}" ) ;
450450 }
451451 } ,
452452 // main dealer request handling (dealer expects an answer)
453453 request = self . connect_state_command. next( ) => unwrap! {
454454 request,
455455 |request| if let Err ( e) = self . handle_connect_state_request( request) . await {
456- error!( "couldn't handle connect state command: {}" , e ) ;
456+ error!( "couldn't handle connect state command: {e}" ) ;
457457 }
458458 } ,
459459 // volume request handling is send separately (it's more like a fire forget)
@@ -491,12 +491,12 @@ impl SpircTask {
491491 } ,
492492 cmd = async { commands?. recv( ) . await } , if commands. is_some( ) => if let Some ( cmd) = cmd {
493493 if let Err ( e) = self . handle_command( cmd) . await {
494- debug!( "could not dispatch command: {}" , e ) ;
494+ debug!( "could not dispatch command: {e}" ) ;
495495 }
496496 } ,
497497 event = async { player_events?. recv( ) . await } , if player_events. is_some( ) => if let Some ( event) = event {
498498 if let Err ( e) = self . handle_player_event( event) {
499- error!( "could not dispatch player event: {}" , e ) ;
499+ error!( "could not dispatch player event: {e}" ) ;
500500 }
501501 } ,
502502 _ = async { sleep( UPDATE_STATE_DELAY ) . await } , if self . update_state => {
@@ -606,7 +606,7 @@ impl SpircTask {
606606 }
607607
608608 async fn handle_command ( & mut self , cmd : SpircCommand ) -> Result < ( ) , Error > {
609- trace ! ( "Received SpircCommand::{:?}" , cmd ) ;
609+ trace ! ( "Received SpircCommand::{cmd :?}" ) ;
610610 match cmd {
611611 SpircCommand :: Shutdown => {
612612 trace ! ( "Received SpircCommand::Shutdown" ) ;
@@ -618,16 +618,15 @@ impl SpircTask {
618618 }
619619 }
620620 SpircCommand :: Activate if !self . connect_state . is_active ( ) => {
621- trace ! ( "Received SpircCommand::{:?}" , cmd ) ;
621+ trace ! ( "Received SpircCommand::{cmd :?}" ) ;
622622 self . handle_activate ( ) ;
623623 return self . notify ( ) . await ;
624624 }
625- SpircCommand :: Activate => warn ! (
626- "SpircCommand::{:?} will be ignored while already active" ,
627- cmd
628- ) ,
625+ SpircCommand :: Activate => {
626+ warn ! ( "SpircCommand::{cmd:?} will be ignored while already active" )
627+ }
629628 _ if !self . connect_state . is_active ( ) => {
630- warn ! ( "SpircCommand::{:?} will be ignored while Not Active" , cmd )
629+ warn ! ( "SpircCommand::{cmd :?} will be ignored while Not Active" )
631630 }
632631 SpircCommand :: Disconnect { pause } => {
633632 if pause {
@@ -787,7 +786,7 @@ impl SpircTask {
787786 }
788787
789788 async fn handle_connection_id_update ( & mut self , connection_id : String ) -> Result < ( ) , Error > {
790- trace ! ( "Received connection ID update: {:?}" , connection_id ) ;
789+ trace ! ( "Received connection ID update: {connection_id :?}" ) ;
791790 self . session . set_connection_id ( & connection_id) ;
792791
793792 let cluster = match self
@@ -837,7 +836,7 @@ impl SpircTask {
837836 }
838837
839838 fn handle_user_attributes_update ( & mut self , update : UserAttributesUpdate ) {
840- trace ! ( "Received attributes update: {:#?}" , update ) ;
839+ trace ! ( "Received attributes update: {update :#?}" ) ;
841840 let attributes: UserAttributes = update
842841 . pairs
843842 . iter ( )
@@ -863,12 +862,7 @@ impl SpircTask {
863862 } ;
864863 self . session . set_user_attribute ( key, new_value) ;
865864
866- trace ! (
867- "Received attribute mutation, {} was {} is now {}" ,
868- key,
869- old_value,
870- new_value
871- ) ;
865+ trace ! ( "Received attribute mutation, {key} was {old_value} is now {new_value}" ) ;
872866
873867 if key == "filter-explicit-content" && new_value == "1" {
874868 self . player
@@ -882,10 +876,7 @@ impl SpircTask {
882876 self . add_autoplay_resolving_when_required ( )
883877 }
884878 } else {
885- trace ! (
886- "Received attribute mutation for {} but key was not found!" ,
887- key
888- ) ;
879+ trace ! ( "Received attribute mutation for {key} but key was not found!" ) ;
889880 }
890881 }
891882 }
@@ -1743,7 +1734,7 @@ impl SpircTask {
17431734 }
17441735
17451736 fn set_volume ( & mut self , volume : u16 ) {
1746- debug ! ( "SpircTask::set_volume({})" , volume ) ;
1737+ debug ! ( "SpircTask::set_volume({volume })" ) ;
17471738
17481739 let old_volume = self . connect_state . device_info ( ) . volume ;
17491740 let new_volume = volume as u32 ;
0 commit comments