Convert ShellError::NetworkFailure to named fields (#11093)

# Description

Part of #10700
This commit is contained in:
Eric Hodel
2023-11-19 12:32:11 -08:00
committed by GitHub
parent 08715e6308
commit da59dfe7d2
2 changed files with 14 additions and 22 deletions

View File

@ -676,7 +676,11 @@ pub enum ShellError {
/// It's always DNS.
#[error("Network failure")]
#[diagnostic(code(nu::shell::network_failure))]
NetworkFailure(String, #[label("{0}")] Span),
NetworkFailure {
msg: String,
#[label("{msg}")]
span: Span,
},
/// Help text for this command could not be found.
///