Skip to content

Commit 0cf0f9f

Browse files
committed
Use join_with_double_colon in write_shared.rs.
For consistency. Also, it's faster because `join_with_double_colon` does a better job estimating the allocation size than `join` from `itertools`.
1 parent ea34650 commit 0cf0f9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/render/write_shared.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use std::str::FromStr;
2525
use std::{fmt, fs};
2626

2727
use indexmap::IndexMap;
28-
use itertools::Itertools;
2928
use regex::Regex;
3029
use rustc_data_structures::flock;
3130
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
@@ -44,6 +43,7 @@ use crate::docfs::PathError;
4443
use crate::error::Error;
4544
use crate::formats::Impl;
4645
use crate::formats::item_type::ItemType;
46+
use crate::html::format::join_with_double_colon;
4747
use crate::html::layout;
4848
use crate::html::render::ordered_json::{EscapedJson, OrderedJson};
4949
use crate::html::render::search_index::{SerializedSearchIndex, build_index};
@@ -612,7 +612,7 @@ impl TypeAliasPart {
612612
for &(type_alias_fqp, type_alias_item) in type_aliases {
613613
cx.id_map.borrow_mut().clear();
614614
cx.deref_id_map.borrow_mut().clear();
615-
let type_alias_fqp = (*type_alias_fqp).iter().join("::");
615+
let type_alias_fqp = join_with_double_colon(&type_alias_fqp);
616616
if let Some(ret) = &mut ret {
617617
ret.aliases.push(type_alias_fqp);
618618
} else {

0 commit comments

Comments
 (0)