File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -622,18 +622,16 @@ impl EmitterWriter {
622
622
// 3 | |
623
623
// 4 | | }
624
624
// | |_^ test
625
- if line. annotations . len ( ) == 1 {
626
- if let Some ( ref ann) = line. annotations . get ( 0 ) {
627
- if let AnnotationType :: MultilineStart ( depth) = ann. annotation_type {
628
- if source_string. chars ( ) . take ( ann. start_col ) . all ( |c| c. is_whitespace ( ) ) {
629
- let style = if ann. is_primary {
630
- Style :: UnderlinePrimary
631
- } else {
632
- Style :: UnderlineSecondary
633
- } ;
634
- buffer. putc ( line_offset, width_offset + depth - 1 , '/' , style) ;
635
- return vec ! [ ( depth, style) ] ;
636
- }
625
+ if let [ ann] = & line. annotations [ ..] {
626
+ if let AnnotationType :: MultilineStart ( depth) = ann. annotation_type {
627
+ if source_string. chars ( ) . take ( ann. start_col ) . all ( |c| c. is_whitespace ( ) ) {
628
+ let style = if ann. is_primary {
629
+ Style :: UnderlinePrimary
630
+ } else {
631
+ Style :: UnderlineSecondary
632
+ } ;
633
+ buffer. putc ( line_offset, width_offset + depth - 1 , '/' , style) ;
634
+ return vec ! [ ( depth, style) ] ;
637
635
}
638
636
}
639
637
}
You can’t perform that action at this time.
0 commit comments