pre allocate

This commit is contained in:
figsoda 2020-11-16 18:53:37 -05:00
parent 56c0ec1b7b
commit a69bf02dba

View file

@ -81,7 +81,7 @@ impl Client {
if buf != b"OK MPD " {
bail!("server did not greet with a success");
}
cl.read_line(&mut String::new()).await?;
cl.read_line(&mut String::with_capacity(8)).await?;
Ok(Client(cl))
}