diff options
| author | Yotam Ofek <yotam.ofek@gmail.com> | 2025-09-23 01:04:14 +0300 |
|---|---|---|
| committer | Yotam Ofek <yotam.ofek@gmail.com> | 2025-09-23 17:29:47 +0300 |
| commit | e697f206fe4eba49f8984ef2d436bc0cd19ff8fc (patch) | |
| tree | b06b81ce8becc28d3c57c5dd33fc4287fe491d9e | |
| parent | aaff372f4b45f88dc3b28fe3c1c8ec22cb3b3411 (diff) | |
| download | rust-e697f206fe4eba49f8984ef2d436bc0cd19ff8fc.tar.gz rust-e697f206fe4eba49f8984ef2d436bc0cd19ff8fc.zip | |
Remove unused param from `write_header`
| -rw-r--r-- | src/librustdoc/html/highlight.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index b1257999c07..fe2b2fc6031 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -57,18 +57,13 @@ pub(crate) fn render_example_with_highlighting( extra_classes: &[String], ) -> impl Display { fmt::from_fn(move |f| { - write_header("rust-example-rendered", None, tooltip, extra_classes).fmt(f)?; + write_header("rust-example-rendered", tooltip, extra_classes).fmt(f)?; write_code(f, src, None, None, None); write_footer(playground_button).fmt(f) }) } -fn write_header( - class: &str, - extra_content: Option<&str>, - tooltip: Option<&Tooltip>, - extra_classes: &[String], -) -> impl Display { +fn write_header(class: &str, tooltip: Option<&Tooltip>, extra_classes: &[String]) -> impl Display { fmt::from_fn(move |f| { write!( f, @@ -109,10 +104,6 @@ fn write_header( write!(f, "<a href=\"#\" class=\"tooltip\" title=\"{tooltip}\">ⓘ</a>")?; } - if let Some(extra) = extra_content { - f.write_str(extra)?; - } - let classes = fmt::from_fn(|f| { iter::once("rust") .chain(Some(class).filter(|class| !class.is_empty())) |
