File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 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> {
119119 ) -> DisplayList < ' a > {
120120 let mut body = vec ! [ ] ;
121121
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) ) ;
129123
130124 for ( idx, snippet) in snippets. into_iter ( ) . enumerate ( ) {
131125 body. append ( & mut format_slice (
@@ -740,12 +734,12 @@ fn format_label(
740734 result
741735}
742736
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 > {
744738 DisplayLine :: Raw ( DisplayRawLine :: Annotation {
745739 annotation : Annotation {
746- annotation_type : DisplayAnnotationType :: from ( title . level ) ,
740+ annotation_type : DisplayAnnotationType :: from ( level) ,
747741 id,
748- label : format_label ( Some ( title . label ) , Some ( DisplayTextStyle :: Emphasis ) ) ,
742+ label : format_label ( Some ( label) , Some ( DisplayTextStyle :: Emphasis ) ) ,
749743 } ,
750744 source_aligned : false ,
751745 continuation : false ,
You can’t perform that action at this time.
0 commit comments