Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit eec21d2

Browse files
committed
Avoid intermediate collect()
1 parent a83112f commit eec21d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ impl Path {
19551955
}
19561956

19571957
crate fn whole_name(&self) -> String {
1958-
self.segments.iter().map(|s| s.name.to_string()).collect::<Vec<_>>().join("::")
1958+
self.segments.iter().map(|s| s.name.to_string()).intersperse("::".into()).collect()
19591959
}
19601960

19611961
/// Checks if this is a `T::Name` path for an associated type.

0 commit comments

Comments
 (0)