diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-12-13 10:20:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-13 10:20:37 +0100 |
| commit | 19e7dbd288ddb5e4b59c1ef1c165cc8b301ee24f (patch) | |
| tree | fe57b39a98bbdee3fb5cc6120ce0404d0f9376d0 | |
| parent | 71ec1457ee9868a838e4521a3510cdd416c0c295 (diff) | |
| download | rust-19e7dbd288ddb5e4b59c1ef1c165cc8b301ee24f.tar.gz rust-19e7dbd288ddb5e4b59c1ef1c165cc8b301ee24f.zip | |
Improve rustdoc markdown variable naming
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 1e1c657b0bf..b141820fe42 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -236,12 +236,12 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> { return event; }; - let mut origtext = String::new(); + let mut original_text = String::new(); for event in &mut self.inner { match event { Event::End(Tag::CodeBlock(..)) => break, Event::Text(ref s) => { - origtext.push_str(s); + original_text.push_str(s); } _ => {} } @@ -258,7 +258,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> { <pre class=\"language-{}\"><code>{}</code></pre>\ </div>", lang, - Escape(&origtext), + Escape(&original_text), ) .into(), )); @@ -268,7 +268,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> { CodeBlockKind::Indented => Default::default(), }; - let lines = origtext.lines().filter_map(|l| map_line(l).for_html()); + let lines = original_text.lines().filter_map(|l| map_line(l).for_html()); let text = lines.intersperse("\n".into()).collect::<String>(); compile_fail = parse_result.compile_fail; @@ -285,7 +285,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> { if url.is_empty() { return None; } - let test = origtext + let test = original_text .lines() .map(|l| map_line(l).for_code()) .intersperse("\n".into()) |
