@@ -198,7 +198,7 @@ impl<'a> DisplaySet<'a> {
198
198
self . format_label ( line_offset, & annotation. label , stylesheet, buffer)
199
199
} else {
200
200
let id = match & annotation. id {
201
- Some ( id) => format ! ( "[{}]" , id ) ,
201
+ Some ( id) => format ! ( "[{id }]" ) ,
202
202
None => String :: new ( ) ,
203
203
} ;
204
204
buffer. append (
@@ -290,12 +290,12 @@ impl<'a> DisplaySet<'a> {
290
290
} => {
291
291
let lineno_color = stylesheet. line_no ( ) ;
292
292
if anonymized_line_numbers && lineno. is_some ( ) {
293
- let num = format ! ( "{:>width $} |" , ANONYMIZED_LINE_NUM , width = lineno_width ) ;
293
+ let num = format ! ( "{ANONYMIZED_LINE_NUM:>lineno_width $} |" ) ;
294
294
buffer. puts ( line_offset, 0 , & num, * lineno_color) ;
295
295
} else {
296
296
match lineno {
297
297
Some ( n) => {
298
- let num = format ! ( "{:>width $} |" , n , width = lineno_width ) ;
298
+ let num = format ! ( "{n:>lineno_width $} |" ) ;
299
299
buffer. puts ( line_offset, 0 , & num, * lineno_color) ;
300
300
}
301
301
None => {
@@ -645,7 +645,7 @@ impl<'a> DisplaySet<'a> {
645
645
} else if formatted_len != 0 {
646
646
formatted_len += 2 ;
647
647
let id = match & annotation. annotation . id {
648
- Some ( id) => format ! ( "[{}]" , id ) ,
648
+ Some ( id) => format ! ( "[{id }]" ) ,
649
649
None => String :: new ( ) ,
650
650
} ;
651
651
buffer. puts (
@@ -1292,10 +1292,7 @@ fn format_body(
1292
1292
None
1293
1293
}
1294
1294
} ) {
1295
- panic ! (
1296
- "SourceAnnotation range `{:?}` is beyond the end of buffer `{}`" ,
1297
- bigger, source_len
1298
- )
1295
+ panic ! ( "SourceAnnotation range `{bigger:?}` is beyond the end of buffer `{source_len}`" )
1299
1296
}
1300
1297
1301
1298
let mut body = vec ! [ ] ;
0 commit comments