Fix 'binding modifiers may only be written when the default binding mode is'

This commit is contained in:
Sylvestre Ledru
2025-03-24 21:02:48 +01:00
parent 95b2de78e1
commit 5b1b40bfd8
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -355,9 +355,9 @@ fn cut_files(mut filenames: Vec<String>, 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;
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -154,7 +154,7 @@ pub fn instantiate_current_writer(
};
Ok(BufWriter::new(Box::new(file) as Box<dyn Write>))
}
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<dyn Write>)),