mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:04:40 +02:00
Move input/output type from Command to Signature (#5880)
This commit is contained in:
@ -2598,10 +2598,10 @@ pub fn parse_register(
|
||||
// the plugin is called to get the signatures or to use the given signature
|
||||
let signature = call.positional_nth(1).map(|expr| {
|
||||
let signature = working_set.get_span_contents(expr.span);
|
||||
serde_json::from_slice::<Signature>(signature).map_err(|_| {
|
||||
serde_json::from_slice::<Signature>(signature).map_err(|e| {
|
||||
ParseError::LabeledError(
|
||||
"Signature deserialization error".into(),
|
||||
"unable to deserialize signature".into(),
|
||||
format!("unable to deserialize signature: {}", e),
|
||||
spans[0],
|
||||
)
|
||||
})
|
||||
|
@ -748,7 +748,7 @@ pub fn parse_internal_call(
|
||||
|
||||
let decl = working_set.get_decl(decl_id);
|
||||
let signature = decl.signature();
|
||||
let output = decl.output_type();
|
||||
let output = signature.output_type.clone();
|
||||
|
||||
working_set.type_scope.add_type(output.clone());
|
||||
|
||||
|
Reference in New Issue
Block a user