Skip to content

Commit

Permalink
chore: Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed Dec 30, 2024
1 parent 6ced603 commit dce34e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions breakwater/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,12 @@ pub async fn handle_connection<FB: FrameBuffer>(

loop {
// Fill the buffer up with new data from the socket
// If there are any bytes left over from the previous loop iteration leave them as is and but the new data behind
let bytes_read = match stream
// If there are any bytes left over from the previous loop iteration leave them as is and put the new data behind
let Ok(bytes_read) = stream
.read(&mut buffer[leftover_bytes_in_buffer..network_buffer_size - parser_lookahead])
.await
{
Ok(bytes_read) => bytes_read,
Err(_) => {
break;
}
else {
break;
};

statistics_bytes_read += bytes_read as u64;
Expand Down
2 changes: 1 addition & 1 deletion breakwater/src/sinks/vnc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub enum Error {
}

// Sorry! Help needed :)
unsafe impl<'a, FB: FrameBuffer> Send for VncSink<'a, FB> {}
unsafe impl<FB: FrameBuffer> Send for VncSink<'_, FB> {}

pub struct VncSink<'a, FB: FrameBuffer> {
fb: Arc<FB>,
Expand Down

0 comments on commit dce34e8

Please sign in to comment.