@@ -247,7 +247,7 @@ impl BacktraceFrameFmt<'_, '_, '_> {
247247 if self . symbol_index == 0 {
248248 write ! ( self . fmt. fmt, "{:4}: " , self . fmt. frame_index) ?;
249249 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 $?} - " ) ?;
251251 }
252252 } else {
253253 write ! ( self . fmt. fmt, " " ) ?;
@@ -260,8 +260,8 @@ impl BacktraceFrameFmt<'_, '_, '_> {
260260 // more information if we're a full backtrace. Here we also handle
261261 // symbols which don't have a name,
262262 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}" ) ?,
265265 ( None , _) | ( _, PrintFmt :: __Nonexhaustive) => write ! ( self . fmt. fmt, "<unknown>" ) ?,
266266 }
267267 self . fmt . fmt . write_str ( "\n " ) ?;
@@ -283,18 +283,18 @@ impl BacktraceFrameFmt<'_, '_, '_> {
283283 // Filename/line are printed on lines under the symbol name, so print
284284 // some appropriate whitespace to sort of right-align ourselves.
285285 if let PrintFmt :: Full = self . fmt . format {
286- write ! ( self . fmt. fmt, "{:1 $}" , "" , HEX_WIDTH ) ?;
286+ write ! ( self . fmt. fmt, "{:HEX_WIDTH $}" , "" ) ?;
287287 }
288288 write ! ( self . fmt. fmt, " at " ) ?;
289289
290290 // Delegate to our internal callback to print the filename and then
291291 // print out the line number.
292292 ( self . fmt . print_path ) ( self . fmt . fmt , file) ?;
293- write ! ( self . fmt. fmt, ":{}" , line ) ?;
293+ write ! ( self . fmt. fmt, ":{line}" ) ?;
294294
295295 // Add column number, if available.
296296 if let Some ( colno) = colno {
297- write ! ( self . fmt. fmt, ":{}" , colno ) ?;
297+ write ! ( self . fmt. fmt, ":{colno}" ) ?;
298298 }
299299
300300 write ! ( self . fmt. fmt, "\n " ) ?;
@@ -305,7 +305,7 @@ impl BacktraceFrameFmt<'_, '_, '_> {
305305 // We only care about the first symbol of a frame
306306 if self . symbol_index == 0 {
307307 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) ?;
309309 self . fmt . fmt . write_str ( "}}}\n " ) ?;
310310 }
311311 Ok ( ( ) )
0 commit comments