diff options
-rw-r--r-- | examples/example.rs | 2 | ||||
-rw-r--r-- | src/send.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/examples/example.rs b/examples/example.rs index 0a6dc42..fc5f1fb 100644 --- a/examples/example.rs +++ b/examples/example.rs @@ -12,7 +12,7 @@ async fn example(tx: &RudpSender<Client>, rx: &mut RudpReceiver<Client>) -> io:: pkt.write_u16::<BigEndian>(40)?; // MinProtoVer pkt.write_u16::<BigEndian>(40)?; // MaxProtoVer pkt.write_u16::<BigEndian>(3)?; // player name length - pkt.write(b"foo")?; // player name + pkt.write_all(b"foo")?; // player name tx.send(mt_rudp::Pkt { unrel: true, diff --git a/src/send.rs b/src/send.rs index 3ec3c64..741c542 100644 --- a/src/send.rs +++ b/src/send.rs @@ -12,7 +12,6 @@ impl<S: UdpSender> RudpSender<S> { } impl<S: UdpSender> RudpShare<S> { - #[allow(clippy::unused_io_amount)] pub async fn send(&self, tp: PktType, pkt: Pkt<&[u8]>) -> AckResult { let mut buf = Vec::with_capacity(4 + 2 + 1 + 1 + 2 + 1 + pkt.data.len()); buf.write_u32::<BigEndian>(PROTO_ID)?; @@ -28,7 +27,7 @@ impl<S: UdpSender> RudpShare<S> { } buf.write_u8(tp as u8)?; - buf.write(pkt.data)?; + buf.write_all(pkt.data)?; self.send_raw(&buf).await?; |