aboutsummaryrefslogtreecommitdiff
path: root/src/send.rs
diff options
context:
space:
mode:
authorLizzy Fleckenstein <eliasfleckenstein@web.de>2023-01-07 01:18:34 +0100
committerLizzy Fleckenstein <eliasfleckenstein@web.de>2023-01-07 01:18:34 +0100
commit701f249245ecbd813e7da924fb9eafab5a7cfd0b (patch)
tree4ebda139577c81e433ca5be14baf1540e2bae38c /src/send.rs
parent9cf950fd1618dc888b6271346386acc64c282177 (diff)
downloadmt_rudp-701f249245ecbd813e7da924fb9eafab5a7cfd0b.tar.xz
write_all
Diffstat (limited to 'src/send.rs')
-rw-r--r--src/send.rs3
1 files changed, 1 insertions, 2 deletions
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?;