File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ impl<'a> RustcFormat<'a> {
32
32
33
33
if let NodeValue :: Heading ( NodeHeading { level : 1 , .. } ) = child_data. value {
34
34
if let Some ( h1) = self . current_h1 . take ( ) {
35
- self . store_version ( h1, section_ast) ?;
35
+ self . store_version ( & h1, & section_ast) ?;
36
36
}
37
37
38
38
let Some ( h1_child_data) = child. first_child ( ) . map ( |c| c. data . borrow ( ) ) else {
@@ -51,16 +51,16 @@ impl<'a> RustcFormat<'a> {
51
51
}
52
52
}
53
53
if let Some ( h1) = self . current_h1 . take ( ) {
54
- self . store_version ( h1, section_ast) ?;
54
+ self . store_version ( & h1, & section_ast) ?;
55
55
}
56
56
57
57
Ok ( self . result )
58
58
}
59
59
60
- fn store_version ( & mut self , h1 : String , body : Vec < & ' a AstNode < ' a > > ) -> anyhow:: Result < ( ) > {
60
+ fn store_version ( & mut self , h1 : & str , body : & [ & ' a AstNode < ' a > ] ) -> anyhow:: Result < ( ) > {
61
61
// Create a document with only the contents of this section
62
62
let document = self . arena . alloc ( NodeValue :: Document . into ( ) ) ;
63
- for child in & body {
63
+ for child in body {
64
64
document. append ( child) ;
65
65
}
66
66
You can’t perform that action at this time.
0 commit comments