Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
KershawChang committed Jul 19, 2023
1 parent 3aa6a7a commit 92724e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions neqo-http3/src/send_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use std::any::Any;
use std::cell::RefCell;
use std::cmp::min;
use std::fmt::Debug;
use std::mem;
use std::rc::Rc;

const MAX_DATA_HEADER_SIZE_2: usize = (1 << 6) - 1; // Maximal amount of data with DATA frame header size 2
Expand Down Expand Up @@ -303,7 +302,6 @@ impl SendStream for SendMessage {
Some(self)
}

#[allow(dropping_copy_types)]
fn send_data_atomic(&mut self, conn: &mut Connection, buf: &[u8]) -> Res<()> {
let data_frame = HFrame::Data {
len: buf.len() as u64,
Expand All @@ -312,7 +310,7 @@ impl SendStream for SendMessage {
data_frame.encode(&mut enc);
self.stream.buffer(enc.as_ref());
self.stream.buffer(buf);
mem::drop(self.stream.send_buffer(conn)?);
let _ = self.stream.send_buffer(conn)?;
Ok(())
}
}
Expand Down
4 changes: 1 addition & 3 deletions neqo-transport/src/tparams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ where
#[allow(unused_variables)]
mod tests {
use super::*;
use std::mem;

#[test]
fn basic_tps() {
Expand Down Expand Up @@ -937,8 +936,7 @@ mod tests {
#[test]
#[should_panic]
fn preferred_address_neither() {
#[allow(clippy::drop_copy)]
mem::drop(PreferredAddress::new(None, None));
_ = PreferredAddress::new(None, None);
}

#[test]
Expand Down

0 comments on commit 92724e8

Please sign in to comment.