From a569737ba2f0fa1513d4a6b789ab65d920b0edde Mon Sep 17 00:00:00 2001 From: Milo Turner Date: Mon, 9 Mar 2020 11:12:04 -0400 Subject: [PATCH] don't worry about it ... --- hptp/src/peer.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hptp/src/peer.rs b/hptp/src/peer.rs index a001d9e..082d16b 100644 --- a/hptp/src/peer.rs +++ b/hptp/src/peer.rs @@ -20,11 +20,7 @@ impl Peer { pub async fn send(&mut self, msg: Msg) -> Result<(), tokio::io::Error> { let targ = self.targ.expect("no target to send to"); let bs = msg.ser(); - let mut i = 0; - while i < bs.len() { - let n = self.sock.send_to(&bs[i..], targ).await?; - i += n - } + let _n_sent = self.sock.send_to(&bs, targ).await?; Ok(()) }