Skip to content

Commit 0d93266

Browse files
committed
Initialize the input buffer with some capacity
1 parent 3dce7e5 commit 0d93266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ fn spawn_watch_shell(
263263
println!("Welcome to watch mode! You can type 'help' to get an overview of the commands you can use here.");
264264

265265
thread::spawn(move || {
266-
let mut input = String::new();
266+
let mut input = String::with_capacity(32);
267267
let mut stdin = io::stdin().lock();
268268

269269
loop {

0 commit comments

Comments
 (0)