diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-07-07 20:33:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-07 20:33:32 +0200 |
| commit | ec0c1560be5486ece4c80d007d467d00a3962a24 (patch) | |
| tree | 85d89ef005cd5f481108265900128ce159d26500 /src/librustdoc/html/render/mod.rs | |
| parent | 16ad2f50b577a338c63a5cee2e34a4a4392e07e2 (diff) | |
| parent | d96d54103e9596a0b0916358b858278b5e6072ea (diff) | |
| download | rust-ec0c1560be5486ece4c80d007d467d00a3962a24.tar.gz rust-ec0c1560be5486ece4c80d007d467d00a3962a24.zip | |
Rollup merge of #99017 - GuillaumeGomez:rustdoc-ending-enum, r=notriddle
Replace boolean argument for print_where_clause with an enum to make code more clear As you suggested ``@notriddle.`` Just not sure if the naming seems good to you? r? ``@notriddle``
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 796bd771518..459b0fed6e8 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -70,7 +70,7 @@ use crate::formats::{AssocItemRender, Impl, RenderMode}; use crate::html::escape::Escape; use crate::html::format::{ href, join_with_double_colon, print_abi_with_space, print_constness_with_space, - print_default_space, print_generic_bounds, print_where_clause, Buffer, HrefError, + print_default_space, print_generic_bounds, print_where_clause, Buffer, Ending, HrefError, PrintWithSpace, }; use crate::html::highlight; @@ -747,7 +747,7 @@ fn assoc_type( if !bounds.is_empty() { write!(w, ": {}", print_generic_bounds(bounds, cx)) } - write!(w, "{}", print_where_clause(generics, cx, indent, false)); + write!(w, "{}", print_where_clause(generics, cx, indent, Ending::NoNewline)); if let Some(default) = default { write!(w, " = {}", default.print(cx)) } @@ -796,10 +796,10 @@ fn assoc_method( header_len += 4; let indent_str = " "; render_attributes_in_pre(w, meth, indent_str); - (4, indent_str, false) + (4, indent_str, Ending::NoNewline) } else { render_attributes_in_code(w, meth); - (0, "", true) + (0, "", Ending::Newline) }; w.reserve(header_len + "<a href=\"\" class=\"fnname\">{".len() + "</a>".len()); write!( |
