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

@@ -44,9 +44,9 @@ fn pre<'b, 'g, 'r, 's>(
match preceding_character {
// If None, we are at the start of the file
None | Some('\\') => {
return Err(nom::Err::Error(CustomError::MyError(MyError(
return Err(nom::Err::Error(CustomError::Static(
"Not a valid pre character for line break.",
))));
)));
}
_ => {}
};
@@ -54,9 +54,9 @@ fn pre<'b, 'g, 'r, 's>(
let current_line = input.text_since_line_break();
let is_non_empty_line = current_line.chars().any(|c| !c.is_whitespace());
if !is_non_empty_line {
return Err(nom::Err::Error(CustomError::MyError(MyError(
return Err(nom::Err::Error(CustomError::Static(
"Not a valid pre line for line break.",
))));
)));
}
Ok((input, ()))