diff options
author | Florian Gilcher <florian.gilcher@asquera.de> | 2015-11-04 11:07:31 +0100 |
---|---|---|
committer | Florian Gilcher <florian.gilcher@asquera.de> | 2015-11-04 11:07:31 +0100 |
commit | 7a97b7d40cfaf49119c8d11b484066d85aa835a2 (patch) | |
tree | 6ded8eaff005808630aa64986d8d56318dfc14fd /src/output | |
parent | 7f53da73b7dee3c69360b72386a5d13456287643 (diff) |
Reserve Vector elements instead of resizing
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/details.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output/details.rs b/src/output/details.rs index 4eb0580..49c3fd1 100644 --- a/src/output/details.rs +++ b/src/output/details.rs @@ -683,7 +683,7 @@ impl<U> Table<U> where U: Users { // necessary to maintain information about the previously-printed // lines, as the output will change based on whether the // *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 }; for i in 1 .. row.depth + 1 { |