From a186adbff1119adfeba54e6ab1aa8751e0635fb9 Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Thu, 9 Jun 2022 09:27:42 -0700 Subject: [PATCH] dd: fixing clippy warnings. --- src/uu/dd/src/dd.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uu/dd/src/dd.rs b/src/uu/dd/src/dd.rs index 46c35d0ec..e47f923ee 100644 --- a/src/uu/dd/src/dd.rs +++ b/src/uu/dd/src/dd.rs @@ -606,7 +606,7 @@ impl Write for Output { /// Read helper performs read operations common to all dd reads, and dispatches the buffer to relevant helper functions as dictated by the operations requested by the user. fn read_helper( i: &mut Input, - mut buf: &mut Vec, + buf: &mut Vec, bsize: usize, ) -> std::io::Result { // Local Helper Fns ------------------------------------------------- @@ -621,8 +621,8 @@ fn read_helper( buf.resize(bsize, BUF_INIT_BYTE); let mut rstat = match i.cflags.sync { - Some(ch) => i.fill_blocks(&mut buf, ch)?, - _ => i.fill_consecutive(&mut buf)?, + Some(ch) => i.fill_blocks(buf, ch)?, + _ => i.fill_consecutive(buf)?, }; // Return early if no data if rstat.reads_complete == 0 && rstat.reads_partial == 0 { @@ -631,7 +631,7 @@ fn read_helper( // Perform any conv=x[,x...] options if i.cflags.swab { - perform_swab(&mut buf); + perform_swab(buf); } match i.cflags.mode {