mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 06:10:18 +02:00
Convert PluginFailedToLoad to named fields (#11124)
# Description Part of #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:
@@ -83,7 +83,7 @@ impl From<ShellError> for LabeledError {
|
||||
msg: format!("did you mean '{suggestion}'?"),
|
||||
span: Some(span),
|
||||
},
|
||||
ShellError::PluginFailedToLoad(msg) => LabeledError {
|
||||
ShellError::PluginFailedToLoad { msg } => LabeledError {
|
||||
label: "Plugin failed to load".into(),
|
||||
msg,
|
||||
span: None,
|
||||
|
@@ -68,9 +68,9 @@ impl CustomValue for PluginCustomValue {
|
||||
let stdout_reader = match &mut child.stdout {
|
||||
Some(out) => out,
|
||||
None => {
|
||||
return Err(ShellError::PluginFailedToLoad(
|
||||
"Plugin missing stdout reader".into(),
|
||||
))
|
||||
return Err(ShellError::PluginFailedToLoad {
|
||||
msg: "Plugin missing stdout reader".into(),
|
||||
})
|
||||
}
|
||||
};
|
||||
get_plugin_encoding(stdout_reader)?
|
||||
|
Reference in New Issue
Block a user