mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-29 23:23:53 +00:00
Reserve Vector elements instead of resizing
This commit is contained in:
parent
7f53da73b7
commit
7a97b7d40c
@ -683,7 +683,7 @@ impl<U> Table<U> where U: Users {
|
|||||||
// necessary to maintain information about the previously-printed
|
// necessary to maintain information about the previously-printed
|
||||||
// lines, as the output will change based on whether the
|
// lines, as the output will change based on whether the
|
||||||
// *previous* entry was the last in its directory.
|
// *previous* entry was the last in its directory.
|
||||||
stack.resize(row.depth + 1, TreePart::Edge);
|
stack.reserve(row.depth + 1);
|
||||||
stack[row.depth] = if row.last { TreePart::Corner } else { TreePart::Edge };
|
stack[row.depth] = if row.last { TreePart::Corner } else { TreePart::Edge };
|
||||||
|
|
||||||
for i in 1 .. row.depth + 1 {
|
for i in 1 .. row.depth + 1 {
|
||||||
|
Loading…
Reference in New Issue
Block a user