Skip to content

Commit

Permalink
Rollup merge of rust-lang#95495 - GuillaumeGomez:rm-unneeded-to-strin…
Browse files Browse the repository at this point in the history
…g, r=notriddle

Remove unneeded `to_string` call

Fixes a confusion I made when reading `@camelid's` comment [here](rust-lang#95096 (comment)).

r? `@notriddle`
  • Loading branch information
Dylan-DPC committed Mar 31, 2022
2 parents 4388ac5 + 8c0a8f5 commit 57206d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ fn extra_info_tags(item: &clean::Item, parent: &clean::Item, tcx: TyCtxt<'_>) ->
fn item_function(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, f: &clean::Function) {
let header = it.fn_header(cx.tcx()).expect("printing a function which isn't a function");
let constness = print_constness_with_space(&header.constness, it.const_stability(cx.tcx()));
let unsafety = header.unsafety.print_with_space().to_string();
let unsafety = header.unsafety.print_with_space();
let abi = print_abi_with_space(header.abi).to_string();
let asyncness = header.asyncness.print_with_space();
let visibility = it.visibility.print_with_space(it.def_id, cx).to_string();
Expand Down

0 comments on commit 57206d7

Please sign in to comment.