Skip to content

Commit

Permalink
Silence dropping_references lint. (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss authored Jul 27, 2023
1 parent e1282c3 commit ff6ad21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/easy/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub trait Handler {
/// `transfer` method and then using `read_function` to configure a
/// callback that can reference stack-local data.
fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError> {
drop(data);
let _ = data; // ignore unused
Ok(0)
}

Expand All @@ -136,7 +136,7 @@ pub trait Handler {
/// By default data this option is not set, and this corresponds to the
/// `CURLOPT_SEEKFUNCTION` and `CURLOPT_SEEKDATA` options.
fn seek(&mut self, whence: SeekFrom) -> SeekResult {
drop(whence);
let _ = whence; // ignore unused
SeekResult::CantSeek
}

Expand Down Expand Up @@ -186,7 +186,7 @@ pub trait Handler {
/// By default this option is not set and corresponds to the
/// `CURLOPT_HEADERFUNCTION` and `CURLOPT_HEADERDATA` options.
fn header(&mut self, data: &[u8]) -> bool {
drop(data);
let _ = data; // ignore unused
true
}

Expand Down Expand Up @@ -222,7 +222,7 @@ pub trait Handler {
/// By default this function calls an internal method and corresponds to
/// `CURLOPT_PROGRESSFUNCTION` and `CURLOPT_PROGRESSDATA`.
fn progress(&mut self, dltotal: f64, dlnow: f64, ultotal: f64, ulnow: f64) -> bool {
drop((dltotal, dlnow, ultotal, ulnow));
let _ = (dltotal, dlnow, ultotal, ulnow); // ignore unused
true
}

Expand Down

0 comments on commit ff6ad21

Please sign in to comment.