Minor clean up

This commit is contained in:
Ryan Leckey
2019-06-28 21:36:46 -07:00
parent b81eda3673
commit aa0b27af35
12 changed files with 64 additions and 24 deletions

View File

@@ -48,7 +48,10 @@ pub async fn establish<'a, 'b: 'a>(
Message::Authentication(Authentication::CleartextPassword) => {
// FIXME: Should error early (before send) if the user did not supply a password
conn.send(PasswordMessage::cleartext(options.password.unwrap_or_default())).await?;
conn.send(PasswordMessage::cleartext(
options.password.unwrap_or_default(),
))
.await?;
}
Message::Authentication(Authentication::Md5Password { salt }) => {

View File

@@ -117,8 +117,6 @@ async fn receiver(
}
while len > 0 {
log::trace!("rbuf: {:?}", rbuf);
let size = rbuf.len();
let message = Message::decode(&mut rbuf)?;
len -= size - rbuf.len();