Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumEntangledAndy committed May 14, 2023
1 parent d9600d0 commit 2d1ccf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/core/src/bc_protocol/connection/udpsource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl Stream for UdpPayloadSource {

fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
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;
Expand Down Expand Up @@ -417,7 +417,7 @@ impl Sink<Vec<u8>> for UdpPayloadSource {
}
}
fn start_send(self: Pin<&mut Self>, item: Vec<u8>) -> 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,
Expand Down Expand Up @@ -487,7 +487,7 @@ impl Sink<Vec<u8>> for UdpPayloadSource {
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
let mut this = self.get_mut();
let this = self.get_mut();
if let State::Closed = this.state {
return Poll::Ready(Ok(()));
}
Expand Down

0 comments on commit 2d1ccf5

Please sign in to comment.