From 0d93266462f56d28501f068a764405a0cd0bf41a Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 23 Mar 2024 18:56:30 +0100 Subject: [PATCH] Initialize the input buffer with some capacity --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 7c469d5..2b6a48c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -263,7 +263,7 @@ fn spawn_watch_shell( println!("Welcome to watch mode! You can type 'help' to get an overview of the commands you can use here."); thread::spawn(move || { - let mut input = String::new(); + let mut input = String::with_capacity(32); let mut stdin = io::stdin().lock(); loop {