1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

dd: fix some clippy warnings 'variable does not need to be mutable'

This commit is contained in:
Sylvestre Ledru 2023-05-07 18:46:08 +02:00
parent 93f28dacc0
commit 916f014ef0

View file

@ -295,7 +295,7 @@ impl Parser {
#[allow(clippy::cognitive_complexity)] #[allow(clippy::cognitive_complexity)]
fn parse_input_flags(&mut self, val: &str) -> Result<(), ParseError> { fn parse_input_flags(&mut self, val: &str) -> Result<(), ParseError> {
let mut i = &mut self.iflag; let i = &mut self.iflag;
for f in val.split(',') { for f in val.split(',') {
match f { match f {
// Common flags // Common flags
@ -327,7 +327,7 @@ impl Parser {
#[allow(clippy::cognitive_complexity)] #[allow(clippy::cognitive_complexity)]
fn parse_output_flags(&mut self, val: &str) -> Result<(), ParseError> { fn parse_output_flags(&mut self, val: &str) -> Result<(), ParseError> {
let mut o = &mut self.oflag; let o = &mut self.oflag;
for f in val.split(',') { for f in val.split(',') {
match f { match f {
// Common flags // Common flags
@ -357,7 +357,7 @@ impl Parser {
} }
fn parse_conv_flags(&mut self, val: &str) -> Result<(), ParseError> { fn parse_conv_flags(&mut self, val: &str) -> Result<(), ParseError> {
let mut c = &mut self.conv; let c = &mut self.conv;
for f in val.split(',') { for f in val.split(',') {
match f { match f {
// Conversion // Conversion