forked from extern/nushell
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:
@ -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,
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user