update miette and switch to GenericErrors (#5222)

This commit is contained in:
Kat Marchán
2022-04-18 05:34:10 -07:00
committed by GitHub
parent cf65f77b02
commit 1314a87cb0
141 changed files with 1569 additions and 689 deletions

View File

@ -149,10 +149,12 @@ where
let to_trim = match options.character.as_ref() {
Some(v) => {
if v.item.chars().count() > 1 {
return Err(ShellError::SpannedLabeledError(
return Err(ShellError::GenericError(
"Trim only works with single character".into(),
"needs single character".into(),
v.span,
Some(v.span),
None,
Vec::new(),
));
}
v.item.chars().next()