Initialize the input buffer with some capacity

This commit is contained in:
mo8it 2024-03-23 18:56:30 +01:00
parent 3dce7e5696
commit 0d93266462

View file

@ -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."); println!("Welcome to watch mode! You can type 'help' to get an overview of the commands you can use here.");
thread::spawn(move || { thread::spawn(move || {
let mut input = String::new(); let mut input = String::with_capacity(32);
let mut stdin = io::stdin().lock(); let mut stdin = io::stdin().lock();
loop { loop {