From 2d1ccf518a765b6328feadced536c67cb592c590 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Sun, 14 May 2023 10:45:34 +0700 Subject: [PATCH] Clippy fixes --- crates/core/src/bc_protocol/connection/udpsource.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/core/src/bc_protocol/connection/udpsource.rs b/crates/core/src/bc_protocol/connection/udpsource.rs index cb35b4b..d22c884 100644 --- a/crates/core/src/bc_protocol/connection/udpsource.rs +++ b/crates/core/src/bc_protocol/connection/udpsource.rs @@ -296,7 +296,7 @@ impl Stream for UdpPayloadSource { fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let camera_addr = self.inner.addr; - let mut this = self.get_mut(); + let this = self.get_mut(); match this.state { State::Normal => { // this.state = State::YieldNow; @@ -417,7 +417,7 @@ impl Sink> for UdpPayloadSource { } } fn start_send(self: Pin<&mut Self>, item: Vec) -> std::result::Result<(), Self::Error> { - let mut this = self.get_mut(); + let this = self.get_mut(); for chunk in item.chunks(MTU - UDPDATA_HEADER_SIZE) { let udp_data = UdpData { connection_id: this.camera_id, @@ -487,7 +487,7 @@ impl Sink> for UdpPayloadSource { self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll> { - let mut this = self.get_mut(); + let this = self.get_mut(); if let State::Closed = this.state { return Poll::Ready(Ok(())); }