From 5b1b40bfd8dcffb52dce18bd7a80415195d00f29 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 8 Mar 2025 14:50:01 +0100 Subject: [PATCH] Fix 'binding modifiers may only be written when the default binding mode is' --- src/uu/cut/src/cut.rs | 6 +++--- src/uu/split/src/filenames.rs | 2 +- src/uu/split/src/platform/unix.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/uu/cut/src/cut.rs b/src/uu/cut/src/cut.rs index c4c2527b8..f3f268d37 100644 --- a/src/uu/cut/src/cut.rs +++ b/src/uu/cut/src/cut.rs @@ -355,9 +355,9 @@ fn cut_files(mut filenames: Vec, mode: &Mode) { } show_if_err!(match mode { - Mode::Bytes(ref ranges, ref opts) => cut_bytes(stdin(), ranges, opts), - Mode::Characters(ref ranges, ref opts) => cut_bytes(stdin(), ranges, opts), - Mode::Fields(ref ranges, ref opts) => cut_fields(stdin(), ranges, opts), + Mode::Bytes(ranges, opts) => cut_bytes(stdin(), ranges, opts), + Mode::Characters(ranges, opts) => cut_bytes(stdin(), ranges, opts), + Mode::Fields(ranges, opts) => cut_fields(stdin(), ranges, opts), }); stdin_read = true; diff --git a/src/uu/split/src/filenames.rs b/src/uu/split/src/filenames.rs index 9e899a417..d2883a711 100644 --- a/src/uu/split/src/filenames.rs +++ b/src/uu/split/src/filenames.rs @@ -200,7 +200,7 @@ impl Suffix { } // Auto pre-calculate new suffix length (auto-width) if necessary - if let Strategy::Number(ref number_type) = strategy { + if let Strategy::Number(number_type) = strategy { let chunks = number_type.num_chunks(); let required_length = ((start as u64 + chunks) as f64) .log(stype.radix() as f64) diff --git a/src/uu/split/src/platform/unix.rs b/src/uu/split/src/platform/unix.rs index 451abef92..3ada2cd1b 100644 --- a/src/uu/split/src/platform/unix.rs +++ b/src/uu/split/src/platform/unix.rs @@ -154,7 +154,7 @@ pub fn instantiate_current_writer( }; Ok(BufWriter::new(Box::new(file) as Box)) } - Some(ref filter_command) => Ok(BufWriter::new(Box::new( + Some(filter_command) => Ok(BufWriter::new(Box::new( // spawn a shell command and write to it FilterWriter::new(filter_command, filename)?, ) as Box)),