Convert ShellError::UnsupportedInput to named fields (#10971)

# Description

This is easy to do with rust-analyzer, but I didn't want to just pump
these all out without feedback.

Part of #10700

# User-Facing Changes

None

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A

---------

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
Eric Hodel
2023-11-07 14:25:32 -08:00
committed by GitHub
parent 45b02ce2ab
commit 7a3cbf43e8
56 changed files with 506 additions and 567 deletions

View File

@ -81,12 +81,12 @@ impl Command for LoadEnv {
}
Ok(PipelineData::empty())
}
_ => Err(ShellError::UnsupportedInput(
"'load-env' expects a single record".into(),
"value originated from here".into(),
span,
input.span().unwrap_or(span),
)),
_ => Err(ShellError::UnsupportedInput {
msg: "'load-env' expects a single record".into(),
input: "value originated from here".into(),
msg_span: span,
input_span: input.span().unwrap_or(span),
}),
},
}
}