Continue removing MyError.
This commit is contained in:
@@ -128,9 +128,7 @@ pub(crate) fn start_of_line<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, ()>
|
||||
if input.is_at_start_of_line() {
|
||||
Ok((input, ()))
|
||||
} else {
|
||||
Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Not at start of line",
|
||||
))))
|
||||
Err(nom::Err::Error(CustomError::Static("Not at start of line")))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,9 +149,9 @@ fn _preceded_by_whitespace<'s>(
|
||||
.map(|c| c.is_whitespace() || c == '\u{200B}') // 200B = Zero-width space
|
||||
.unwrap_or(allow_start_of_file)
|
||||
{
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
return Err(nom::Err::Error(CustomError::Static(
|
||||
"Must be preceded by a whitespace character.",
|
||||
))));
|
||||
)));
|
||||
}
|
||||
Ok((input, ()))
|
||||
}
|
||||
@@ -194,9 +192,7 @@ pub(crate) fn text_until_exit<'b, 'g, 'r, 's>(
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn not_yet_implemented() -> Res<OrgSource<'static>, ()> {
|
||||
Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Not implemented yet.",
|
||||
))))
|
||||
Err(nom::Err::Error(CustomError::Static("Not implemented yet.")))
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
Reference in New Issue
Block a user