Avoid intermediate collect()
This commit is contained in:
parent
a83112fe3e
commit
eec21d2176
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue