Convert PluginFailedToEncode to named fields (#11125)

# 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-21 15:38:58 -08:00
committed by GitHub
parent a42fd3611a
commit 64288b4350
5 changed files with 31 additions and 16 deletions

View File

@ -745,9 +745,9 @@ pub enum ShellError {
/// ## Resolution
///
/// This is likely a bug with the plugin itself.
#[error("Plugin failed to encode: {0}")]
#[error("Plugin failed to encode: {msg}")]
#[diagnostic(code(nu::shell::plugin_failed_to_encode))]
PluginFailedToEncode(String),
PluginFailedToEncode { msg: String },
/// A message to a plugin failed to decode.
///