Continue removing MyError.
This commit is contained in:
@@ -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, ()))
|
||||
|
||||
Reference in New Issue
Block a user