mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 20:57:49 +02:00
Convert remainder of ShellError variants to named fields (#11276)
# Description Removed variants that are no longer in use: * `NoFile*` * `UnexpectedAbbrComponent` Converted: * `OutsideSpannedLabeledError` * `EvalBlockWithInput` * `Break` * `Continue` * `Return` * `NotAConstant` * `NotAConstCommand` * `NotAConstHelp` * `InvalidGlobPattern` * `ErrorExpandingGlob` Fixes #10700 # User-Facing Changes None # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A
This commit is contained in:
@ -37,10 +37,10 @@ impl Command for SubCommand {
|
||||
call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
Err(nu_protocol::ShellError::RemovedCommand(
|
||||
self.name().to_string(),
|
||||
"format date".to_owned(),
|
||||
call.head,
|
||||
))
|
||||
Err(nu_protocol::ShellError::RemovedCommand {
|
||||
removed: self.name().to_string(),
|
||||
replacement: "format date".to_owned(),
|
||||
span: call.head,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ impl Command for LetEnv {
|
||||
call: &Call,
|
||||
_: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
Err(nu_protocol::ShellError::RemovedCommand(
|
||||
self.name().to_string(),
|
||||
"$env.<environment variable> = ...".to_owned(),
|
||||
call.head,
|
||||
))
|
||||
Err(nu_protocol::ShellError::RemovedCommand {
|
||||
removed: self.name().to_string(),
|
||||
replacement: "$env.<environment variable> = ...".to_owned(),
|
||||
span: call.head,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user