1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-05-28 06:26:07 +02:00

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.");
thread::spawn(move || {
let mut input = String::new();
let mut input = String::with_capacity(32);
let mut stdin = io::stdin().lock();
loop {