Convert PluginFailedToDecode to named fields (#11126)

# 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:
Eric Hodel
2023-11-22 03:56:04 -08:00
committed by GitHub
parent d5677625a7
commit 776df7cd93
4 changed files with 15 additions and 9 deletions

View File

@ -754,9 +754,9 @@ pub enum ShellError {
/// ## Resolution
///
/// This is either an issue with the inputs to a plugin (bad JSON?) or a bug in the plugin itself. Fix or report as appropriate.
#[error("Plugin failed to decode: {0}")]
#[error("Plugin failed to decode: {msg}")]
#[diagnostic(code(nu::shell::plugin_failed_to_decode))]
PluginFailedToDecode(String),
PluginFailedToDecode { msg: String },
/// I/O operation interrupted.
///