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 {
622622 // 3 | |
623623 // 4 | | }
624624 // | |_^ 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) ] ;
637635 }
638636 }
639637 }
You can’t perform that action at this time.
0 commit comments