diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2021-08-27 16:26:11 -0700 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2021-09-30 13:52:58 -0700 |
| commit | eec21d21763abbb76b8feac31265128a8e2691b0 (patch) | |
| tree | 064b3e230927ff448052e985a3227fe5567a06e8 | |
| parent | a83112fe3e4adac459a73ea0f8018b7eab719238 (diff) | |
| download | rust-eec21d21763abbb76b8feac31265128a8e2691b0.tar.gz rust-eec21d21763abbb76b8feac31265128a8e2691b0.zip | |
Avoid intermediate `collect()`
| -rw-r--r-- | src/librustdoc/clean/types.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index a7a7f05ecfe..05709cc2f4d 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -1955,7 +1955,7 @@ impl Path { } crate fn whole_name(&self) -> String { - self.segments.iter().map(|s| s.name.to_string()).collect::<Vec<_>>().join("::") + self.segments.iter().map(|s| s.name.to_string()).intersperse("::".into()).collect() } /// Checks if this is a `T::Name` path for an associated type. |
