mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-25 14:57:32 -05:00
Initialize the input buffer with some capacity
This commit is contained in:
parent
3dce7e5696
commit
0d93266462
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue