Skip to content

Commit 6c9be79

Browse files
committed
Simplyfy open_tag handling
1 parent 0dd576b commit 6c9be79

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • src/librustdoc/html/render

src/librustdoc/html/render/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,11 +2929,10 @@ pub(super) fn render_attributes_in_code_with_options(
29292929
open_tag: Option<&str>,
29302930
) -> Result<bool, fmt::Error> {
29312931
let mut wrote_any = false;
2932+
let open_tag = open_tag.unwrap_or("");
29322933
let mut render_attr = |attr: &str| -> fmt::Result {
29332934
if !wrote_any {
2934-
if let Some(open_tag) = open_tag {
2935-
w.write_str(open_tag)?;
2936-
}
2935+
w.write_str(open_tag)?;
29372936
wrote_any = true;
29382937
}
29392938
render_code_attribute(prefix, attr, w)

0 commit comments

Comments
 (0)