mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 23:22:10 +02:00
compatible with old rust (#5974)
This commit is contained in:
@ -56,7 +56,11 @@ impl Command for BytesReplace {
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let column_paths: Vec<CellPath> = call.rest(engine_state, stack, 2)?;
|
||||
let column_paths = (!column_paths.is_empty()).then_some(column_paths);
|
||||
let column_paths = if column_paths.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(column_paths)
|
||||
};
|
||||
let find = call.req::<Vec<u8>>(engine_state, stack, 0)?;
|
||||
if find.is_empty() {
|
||||
return Err(ShellError::UnsupportedInput(
|
||||
|
Reference in New Issue
Block a user