@@ -111,20 +111,20 @@ pub(crate) fn versions_from_path<P: AsRef<Path>>(dir: P) -> Result<BTreeSet<Vers
111111
112112/// Runs the given command as a child process.
113113pub ( crate ) fn run_node ( mut command : Command ) -> Result < NodeExitCode > {
114- let mut child = map_and_log_error ( command. spawn ( ) , format ! ( "failed to execute {:?}" , command ) ) ?;
114+ let mut child = map_and_log_error ( command. spawn ( ) , format ! ( "failed to execute {command :?}" ) ) ?;
115115 crate :: CHILD_PID . store ( child. id ( ) , Ordering :: SeqCst ) ;
116116
117117 let exit_status = map_and_log_error (
118118 child. wait ( ) ,
119- format ! ( "failed to wait for completion of {:?}" , command ) ,
119+ format ! ( "failed to wait for completion of {command :?}" ) ,
120120 ) ?;
121121 match exit_status. code ( ) {
122122 Some ( code) if code == NodeExitCode :: Success as i32 => {
123- debug ! ( "successfully finished running {:?}" , command ) ;
123+ debug ! ( "successfully finished running {command :?}" ) ;
124124 Ok ( NodeExitCode :: Success )
125125 }
126126 Some ( code) if code == NodeExitCode :: ShouldDowngrade as i32 => {
127- debug ! ( "finished running {:?} - should downgrade now" , command ) ;
127+ debug ! ( "finished running {command :?} - should downgrade now" ) ;
128128 Ok ( NodeExitCode :: ShouldDowngrade )
129129 }
130130 Some ( code) if code == NodeExitCode :: ShouldExitLauncher as i32 => {
@@ -135,8 +135,8 @@ pub(crate) fn run_node(mut command: Command) -> Result<NodeExitCode> {
135135 Ok ( NodeExitCode :: ShouldExitLauncher )
136136 }
137137 _ => {
138- warn ! ( %exit_status, "failed running {:?}" , command ) ;
139- bail ! ( "{:?} exited with error" , command ) ;
138+ warn ! ( %exit_status, "failed running {command :?}" ) ;
139+ bail ! ( "{command :?} exited with error" ) ;
140140 }
141141 }
142142}
@@ -149,7 +149,7 @@ pub(crate) fn map_and_log_error<T, E: std::error::Error + Send + Sync + 'static>
149149 match result {
150150 Ok ( t) => Ok ( t) ,
151151 Err ( error) => {
152- warn ! ( %error, "{}" , error_msg ) ;
152+ warn ! ( %error, "{error_msg}" ) ;
153153 Err ( Error :: new ( error) . context ( error_msg) )
154154 }
155155 }
@@ -165,9 +165,9 @@ where
165165 // This function should ideally be replaced with `itertools::join()`.
166166 // However, currently, it is only used to produce a proper debug message,
167167 // which is not sufficient justification to add a dependency to `itertools`.
168- let result = iterable. into_iter ( ) . fold ( String :: new ( ) , |result , item| {
169- format ! ( "{}{}, " , result , item )
170- } ) ;
168+ let result = iterable
169+ . into_iter ( )
170+ . fold ( String :: new ( ) , |result , item| format ! ( "{result}{item}, " ) ) ;
171171 if result. is_empty ( ) {
172172 result
173173 } else {
0 commit comments