@@ -247,7 +247,7 @@ impl BacktraceFrameFmt<'_, '_, '_> {
247
247
if self . symbol_index == 0 {
248
248
write ! ( self . fmt. fmt, "{:4}: " , self . fmt. frame_index) ?;
249
249
if let PrintFmt :: Full = self . fmt . format {
250
- write ! ( self . fmt. fmt, "{:1 $?} - " , frame_ip , HEX_WIDTH ) ?;
250
+ write ! ( self . fmt. fmt, "{frame_ip:HEX_WIDTH $?} - " ) ?;
251
251
}
252
252
} else {
253
253
write ! ( self . fmt. fmt, " " ) ?;
@@ -260,8 +260,8 @@ impl BacktraceFrameFmt<'_, '_, '_> {
260
260
// more information if we're a full backtrace. Here we also handle
261
261
// symbols which don't have a name,
262
262
match ( symbol_name, & self . fmt . format ) {
263
- ( Some ( name) , PrintFmt :: Short ) => write ! ( self . fmt. fmt, "{:#}" , name ) ?,
264
- ( Some ( name) , PrintFmt :: Full ) => write ! ( self . fmt. fmt, "{}" , name ) ?,
263
+ ( Some ( name) , PrintFmt :: Short ) => write ! ( self . fmt. fmt, "{name :#}" ) ?,
264
+ ( Some ( name) , PrintFmt :: Full ) => write ! ( self . fmt. fmt, "{name}" ) ?,
265
265
( None , _) | ( _, PrintFmt :: __Nonexhaustive) => write ! ( self . fmt. fmt, "<unknown>" ) ?,
266
266
}
267
267
self . fmt . fmt . write_str ( "\n " ) ?;
@@ -283,18 +283,18 @@ impl BacktraceFrameFmt<'_, '_, '_> {
283
283
// Filename/line are printed on lines under the symbol name, so print
284
284
// some appropriate whitespace to sort of right-align ourselves.
285
285
if let PrintFmt :: Full = self . fmt . format {
286
- write ! ( self . fmt. fmt, "{:1 $}" , "" , HEX_WIDTH ) ?;
286
+ write ! ( self . fmt. fmt, "{:HEX_WIDTH $}" , "" ) ?;
287
287
}
288
288
write ! ( self . fmt. fmt, " at " ) ?;
289
289
290
290
// Delegate to our internal callback to print the filename and then
291
291
// print out the line number.
292
292
( self . fmt . print_path ) ( self . fmt . fmt , file) ?;
293
- write ! ( self . fmt. fmt, ":{}" , line ) ?;
293
+ write ! ( self . fmt. fmt, ":{line}" ) ?;
294
294
295
295
// Add column number, if available.
296
296
if let Some ( colno) = colno {
297
- write ! ( self . fmt. fmt, ":{}" , colno ) ?;
297
+ write ! ( self . fmt. fmt, ":{colno}" ) ?;
298
298
}
299
299
300
300
write ! ( self . fmt. fmt, "\n " ) ?;
@@ -305,7 +305,7 @@ impl BacktraceFrameFmt<'_, '_, '_> {
305
305
// We only care about the first symbol of a frame
306
306
if self . symbol_index == 0 {
307
307
self . fmt . fmt . write_str ( "{{{bt:" ) ?;
308
- write ! ( self . fmt. fmt, "{}:{:?}" , self . fmt. frame_index, frame_ip ) ?;
308
+ write ! ( self . fmt. fmt, "{}:{frame_ip :?}" , self . fmt. frame_index) ?;
309
309
self . fmt . fmt . write_str ( "}}}\n " ) ?;
310
310
}
311
311
Ok ( ( ) )
0 commit comments