Continue removing MyError.

This commit is contained in:
Tom Alexander
2023-10-17 10:09:37 -04:00
parent c9d7251e3b
commit 77e6c22ad8
29 changed files with 84 additions and 128 deletions

View File

@@ -208,9 +208,9 @@ fn pre<'b, 'g, 'r, 's>(
) -> Res<OrgSource<'s>, ()> {
let preceding_character = input.get_preceding_character();
if let Some('$') = preceding_character {
return Err(nom::Err::Error(CustomError::MyError(MyError(
return Err(nom::Err::Error(CustomError::Static(
"Not a valid pre character for dollar char fragment.",
))));
)));
}
Ok((input, ()))
}
@@ -282,9 +282,9 @@ fn close_border<'b, 'g, 'r, 's>(
match preceding_character {
Some(c) if !c.is_whitespace() && !".,;$".contains(c) => Ok((input, ())),
_ => {
return Err(nom::Err::Error(CustomError::MyError(MyError(
return Err(nom::Err::Error(CustomError::Static(
"Not a valid pre character for dollar char fragment.",
))));
)));
}
}
}