File tree 1 file changed +4
-10
lines changed
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -119,13 +119,7 @@ impl<'a> DisplayList<'a> {
119
119
) -> DisplayList < ' a > {
120
120
let mut body = vec ! [ ] ;
121
121
122
- body. push ( format_title (
123
- snippet:: Label {
124
- level,
125
- label : title,
126
- } ,
127
- id,
128
- ) ) ;
122
+ body. push ( format_title ( level, id, title) ) ;
129
123
130
124
for ( idx, snippet) in snippets. into_iter ( ) . enumerate ( ) {
131
125
body. append ( & mut format_slice (
@@ -740,12 +734,12 @@ fn format_label(
740
734
result
741
735
}
742
736
743
- fn format_title < ' a > ( title : snippet :: Label < ' a > , id : Option < & ' a str > ) -> DisplayLine < ' a > {
737
+ fn format_title < ' a > ( level : crate :: Level , id : Option < & ' a str > , label : & ' a str ) -> DisplayLine < ' a > {
744
738
DisplayLine :: Raw ( DisplayRawLine :: Annotation {
745
739
annotation : Annotation {
746
- annotation_type : DisplayAnnotationType :: from ( title . level ) ,
740
+ annotation_type : DisplayAnnotationType :: from ( level) ,
747
741
id,
748
- label : format_label ( Some ( title . label ) , Some ( DisplayTextStyle :: Emphasis ) ) ,
742
+ label : format_label ( Some ( label) , Some ( DisplayTextStyle :: Emphasis ) ) ,
749
743
} ,
750
744
source_aligned : false ,
751
745
continuation : false ,
You can’t perform that action at this time.
0 commit comments