@@ -1707,33 +1707,28 @@ impl FileWithAnnotatedLines {
1707
1707
hi. col_display += 1 ;
1708
1708
}
1709
1709
1710
- let ann_type = if lo. line != hi. line {
1710
+ if lo. line != hi. line {
1711
1711
let ml = MultilineAnnotation {
1712
1712
depth : 1 ,
1713
1713
line_start : lo. line ,
1714
1714
line_end : hi. line ,
1715
1715
start_col : lo. col_display ,
1716
1716
end_col : hi. col_display ,
1717
1717
is_primary : span_label. is_primary ,
1718
- label : span_label. label . clone ( ) ,
1718
+ label : span_label. label ,
1719
1719
overlaps_exactly : false ,
1720
1720
} ;
1721
- multiline_annotations. push ( ( lo. file . clone ( ) , ml. clone ( ) ) ) ;
1722
- AnnotationType :: Multiline ( ml)
1721
+ multiline_annotations. push ( ( lo. file , ml) ) ;
1723
1722
} else {
1724
- AnnotationType :: Singleline
1725
- } ;
1726
- let ann = Annotation {
1727
- start_col : lo. col_display ,
1728
- end_col : hi. col_display ,
1729
- is_primary : span_label. is_primary ,
1730
- label : span_label. label . clone ( ) ,
1731
- annotation_type : ann_type,
1732
- } ;
1733
-
1734
- if !ann. is_multiline ( ) {
1723
+ let ann = Annotation {
1724
+ start_col : lo. col_display ,
1725
+ end_col : hi. col_display ,
1726
+ is_primary : span_label. is_primary ,
1727
+ label : span_label. label ,
1728
+ annotation_type : AnnotationType :: Singleline ,
1729
+ } ;
1735
1730
add_annotation_to_file ( & mut output, lo. file , lo. line , ann) ;
1736
- }
1731
+ } ;
1737
1732
}
1738
1733
}
1739
1734
0 commit comments