forked from extern/nushell
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:
@ -390,7 +390,7 @@ fn to_xml(
|
||||
let s = if let Ok(s) = String::from_utf8(b) {
|
||||
s
|
||||
} else {
|
||||
return Err(ShellError::NonUtf8(head));
|
||||
return Err(ShellError::NonUtf8 { span: head });
|
||||
};
|
||||
Ok(Value::string(s, head).into_pipeline_data())
|
||||
})
|
||||
|
Reference in New Issue
Block a user