Skip to content

Commit ff6ad21

Browse files
authored
Silence dropping_references lint. (#514)
1 parent e1282c3 commit ff6ad21

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/easy/handler.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub trait Handler {
112112
/// `transfer` method and then using `read_function` to configure a
113113
/// callback that can reference stack-local data.
114114
fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError> {
115-
drop(data);
115+
let _ = data; // ignore unused
116116
Ok(0)
117117
}
118118

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

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

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

0 commit comments

Comments
 (0)