We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 884edb2 commit 2e9d395Copy full SHA for 2e9d395
1 file changed
src/cmp.rs
@@ -285,7 +285,7 @@ pub fn parse_params<I: Iterator<Item = OsString>>(mut opts: Peekable<I>) -> Resu
285
286
fn prepare_reader(
287
path: &OsString,
288
- skip: &Option<u64>,
+ skip: &Option<IgnInit>,
289
params: &Params,
290
) -> Result<Box<dyn BufRead>, String> {
291
let mut reader: Box<dyn BufRead> = if path == "-" {
@@ -304,6 +304,8 @@ fn prepare_reader(
304
};
305
306
if let Some(skip) = skip {
307
+ // cast as u64 must remain, because value of IgnInit data type could be changed.
308
+ #[allow(clippy::unnecessary_cast)]
309
if let Err(e) = io::copy(&mut reader.by_ref().take(*skip as u64), &mut io::sink()) {
310
return Err(format_failure_to_read_input_file(
311
¶ms.executable,
0 commit comments