Skip to content

Commit bb105b0

Browse files
committed
RustcFormat::store_version: take params by reference
1 parent 6e48fc0 commit bb105b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/changelogs/rustc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<'a> RustcFormat<'a> {
3232

3333
if let NodeValue::Heading(NodeHeading { level: 1, .. }) = child_data.value {
3434
if let Some(h1) = self.current_h1.take() {
35-
self.store_version(h1, section_ast)?;
35+
self.store_version(&h1, &section_ast)?;
3636
}
3737

3838
let Some(h1_child_data) = child.first_child().map(|c| c.data.borrow()) else {
@@ -51,16 +51,16 @@ impl<'a> RustcFormat<'a> {
5151
}
5252
}
5353
if let Some(h1) = self.current_h1.take() {
54-
self.store_version(h1, section_ast)?;
54+
self.store_version(&h1, &section_ast)?;
5555
}
5656

5757
Ok(self.result)
5858
}
5959

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<()> {
6161
// Create a document with only the contents of this section
6262
let document = self.arena.alloc(NodeValue::Document.into());
63-
for child in &body {
63+
for child in body {
6464
document.append(child);
6565
}
6666

0 commit comments

Comments
 (0)