Fix unsupported type message for some math related commands (#4672)

* Fix unsupported type message of some math related commands

* changing the error form for UnsupportedInput

* cargo fmt
This commit is contained in:
Justin Ma
2022-02-28 23:14:33 +08:00
committed by GitHub
parent 0924975b4c
commit b09acdb7f9
9 changed files with 54 additions and 15 deletions

View File

@ -95,7 +95,10 @@ impl Command for Save {
Ok(PipelineData::new(span))
}
v => Err(ShellError::UnsupportedInput(v.get_type().to_string(), span)),
v => Err(ShellError::UnsupportedInput(
format!("{:?} not supported", v.get_type()),
span,
)),
}
} else {
match input.into_value(span) {
@ -113,7 +116,10 @@ impl Command for Save {
Ok(PipelineData::new(span))
}
v => Err(ShellError::UnsupportedInput(v.get_type().to_string(), span)),
v => Err(ShellError::UnsupportedInput(
format!("{:?} not supported", v.get_type()),
span,
)),
}
}
}