From ed4ec39f88b3abed8b19a5e2a60bf74b72d5d518 Mon Sep 17 00:00:00 2001
From: stratact <stratact1@gmail.com>
Date: Tue, 29 May 2018 03:01:21 -0700
Subject: [PATCH] Use SmallVec instead of Vec for echo builtin

---
 src/lib/builtins/echo.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/builtins/echo.rs b/src/lib/builtins/echo.rs
index 45bacc25..65fdbe7a 100644
--- a/src/lib/builtins/echo.rs
+++ b/src/lib/builtins/echo.rs
@@ -1,4 +1,5 @@
 use std::io::{self, BufWriter, Write};
+use smallvec::SmallVec;
 
 bitflags! {
     struct Flags : u8 {
@@ -10,7 +11,7 @@ bitflags! {
 
 pub(crate) fn echo(args: &[&str]) -> Result<(), io::Error> {
     let mut flags = Flags::empty();
-    let mut data: Vec<&str> = vec![];
+    let mut data: SmallVec<[&str; 16]> = SmallVec::with_capacity(16);
 
     for arg in args {
         match *arg {
-- 
GitLab