@@ -239,19 +239,18 @@ impl MithrilSnapshotConfig {
239239
240240 let Ok ( relative_file) = tmp_file. strip_prefix ( & tmp_path) else {
241241 error ! ( "Failed to get relative path of file." ) ;
242- bail ! ( "Failed to strip prefix: {tmp_path:?}" ) ;
242+ bail ! ( "Failed to strip prefix: {}" , tmp_path . to_string_lossy ( ) ) ;
243243 } ;
244244
245245 // IF we make it here, the files are identical, so we can de-dup them safely.
246246 // Remove the tmp file momentarily.
247247 if tmp_file. exists ( ) {
248248 if let Err ( error) = std:: fs:: remove_file ( tmp_file) {
249249 error ! (
250- "Error removing tmp file {} : {}" ,
250+ "Error removing tmp file {} : {error }" ,
251251 tmp_file. to_string_lossy( ) ,
252- error
253252 ) ;
254- bail ! ( "Failed to remove tmp file: {tmp_file:?}" ) ;
253+ bail ! ( "Failed to remove tmp file: {}" , tmp_file . to_string_lossy ( ) ) ;
255254 }
256255 }
257256
@@ -260,21 +259,23 @@ impl MithrilSnapshotConfig {
260259 // Hardlink the src file to the tmp file.
261260 if let Some ( parent) = tmp_file. parent ( ) {
262261 if let Err ( error) = std:: fs:: create_dir_all ( parent) {
263- error ! ( "Error creating parent dir {parent:?} for tmp file {tmp_file:?}: {error}" ) ;
262+ error ! (
263+ "Error creating parent dir {parent:?} for tmp file {}: {error}" ,
264+ tmp_file. to_string_lossy( )
265+ ) ;
264266 }
265267 }
266268 if let Err ( error) = std:: fs:: hard_link ( src_file, tmp_file) {
267269 error ! (
268- "Error linking src file {} to tmp file {} : {}" ,
270+ "Error linking src file {} to tmp file {} : {error }" ,
269271 src_file. to_string_lossy( ) ,
270272 tmp_file. to_string_lossy( ) ,
271- error
272273 ) ;
273- bail ! ( "Failed to link src file: {src_file:?}" ) ;
274+ bail ! ( "Failed to link src file: {}" , src_file . to_string_lossy ( ) ) ;
274275 }
275276
276277 // And if we made it here, file was successfully de-duped. YAY.
277- debug ! ( "DeDup OK: {tmp_file:?}" ) ;
278+ debug ! ( "DeDup OK: {tmp_file:?}" , ) ;
278279 Ok ( ( ) )
279280 }
280281
0 commit comments