Skip to content

Commit 57206d7

Browse files
authored
Rollup merge of #95495 - GuillaumeGomez:rm-unneeded-to-string, r=notriddle
Remove unneeded `to_string` call Fixes a confusion I made when reading `@camelid's` comment [here](#95096 (comment)). r? `@notriddle`
2 parents 4388ac5 + 8c0a8f5 commit 57206d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/librustdoc/html/render/print_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ fn extra_info_tags(item: &clean::Item, parent: &clean::Item, tcx: TyCtxt<'_>) ->
465465
fn item_function(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, f: &clean::Function) {
466466
let header = it.fn_header(cx.tcx()).expect("printing a function which isn't a function");
467467
let constness = print_constness_with_space(&header.constness, it.const_stability(cx.tcx()));
468-
let unsafety = header.unsafety.print_with_space().to_string();
468+
let unsafety = header.unsafety.print_with_space();
469469
let abi = print_abi_with_space(header.abi).to_string();
470470
let asyncness = header.asyncness.print_with_space();
471471
let visibility = it.visibility.print_with_space(it.def_id, cx).to_string();

0 commit comments

Comments
 (0)