Skip to content

Commit 37bf2bc

Browse files
authored
Rollup merge of rust-lang#105684 - GuillaumeGomez:improve-rustdoc-var-name, r=notriddle
Improve rustdoc markdown variable naming Opened on the right repository this time. 😆 r? `@notriddle`
2 parents e2c9823 + 19e7dbd commit 37bf2bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustdoc/html/markdown.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
236236
return event;
237237
};
238238

239-
let mut origtext = String::new();
239+
let mut original_text = String::new();
240240
for event in &mut self.inner {
241241
match event {
242242
Event::End(Tag::CodeBlock(..)) => break,
243243
Event::Text(ref s) => {
244-
origtext.push_str(s);
244+
original_text.push_str(s);
245245
}
246246
_ => {}
247247
}
@@ -258,7 +258,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
258258
<pre class=\"language-{}\"><code>{}</code></pre>\
259259
</div>",
260260
lang,
261-
Escape(&origtext),
261+
Escape(&original_text),
262262
)
263263
.into(),
264264
));
@@ -268,7 +268,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
268268
CodeBlockKind::Indented => Default::default(),
269269
};
270270

271-
let lines = origtext.lines().filter_map(|l| map_line(l).for_html());
271+
let lines = original_text.lines().filter_map(|l| map_line(l).for_html());
272272
let text = lines.intersperse("\n".into()).collect::<String>();
273273

274274
compile_fail = parse_result.compile_fail;
@@ -285,7 +285,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
285285
if url.is_empty() {
286286
return None;
287287
}
288-
let test = origtext
288+
let test = original_text
289289
.lines()
290290
.map(|l| map_line(l).for_code())
291291
.intersperse("\n".into())

0 commit comments

Comments
 (0)