Convert more ShellError variants to named fields (#11222)

# Description

Convert errors to named fields:
* NeedsPositiveValue
* MissingConfigValue
* UnsupportedConfigValue
* DowncastNotPossible
* NonUtf8Custom
* NonUtf8
* DidYouMeanCustom
* DidYouMean
* ReadingFile
* RemoveNotPossible
* ChangedModifiedTimeNotPossible
* ChangedAccessTimeNotPossible

Part of #10700
This commit is contained in:
Eric Hodel
2023-12-04 01:19:32 -08:00
committed by GitHub
parent b227eea668
commit 67eec92e76
26 changed files with 299 additions and 208 deletions

View File

@@ -248,7 +248,13 @@ mod test {
span,
),
Value::nothing(span),
Value::error(ShellError::DidYouMean("what?".to_string(), span), span),
Value::error(
ShellError::DidYouMean {
suggestion: "what?".to_string(),
span,
},
span,
),
Value::cell_path(
CellPath {
members: vec![PathMember::Int {