Continue removing MyError.

This commit is contained in:
Tom Alexander
2023-10-17 10:35:33 -04:00
parent e776a051ad
commit 20c4a0f8f7
13 changed files with 29 additions and 37 deletions

View File

@@ -49,10 +49,8 @@ fn _filtered_keyword<'s, F: Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s
// TODO: When key is a member of org-element-parsed-keywords, value can contain the standard set objects, excluding footnote references.
let (remaining, (consumed_input, (_, _, parsed_key, _))) =
consumed(tuple((space0, tag("#+"), key_parser, tag(":"))))(input)?;
if let Ok((remaining, _)) = tuple((
space0::<OrgSource<'_>, CustomError<OrgSource<'_>>>,
alt((line_ending, eof)),
))(remaining)
if let Ok((remaining, _)) =
tuple((space0::<_, CustomError>, alt((line_ending, eof))))(remaining)
{
return Ok((
remaining,
@@ -161,10 +159,7 @@ fn plain_affiliated_key<'b, 'g, 'r, 's>(
) -> Res<OrgSource<'s>, OrgSource<'s>> {
for keyword in context.get_global_settings().element_affiliated_keywords {
let result = map(
tuple((
tag_no_case::<_, _, CustomError<_>>(*keyword),
peek(tag(":")),
)),
tuple((tag_no_case::<_, _, CustomError>(*keyword), peek(tag(":")))),
|(key, _)| key,
)(input);
if let Ok((remaining, ent)) = result {
@@ -182,7 +177,7 @@ fn dual_affiliated_key<'b, 'g, 'r, 's>(
) -> Res<OrgSource<'s>, OrgSource<'s>> {
for keyword in context.get_global_settings().element_dual_keywords {
let result = recognize(tuple((
tag_no_case::<_, _, CustomError<_>>(*keyword),
tag_no_case::<_, _, CustomError>(*keyword),
tag("["),
optval,
tag("]"),
@@ -221,7 +216,7 @@ fn _optval_end<'s>(
unreachable!("Exceeded optval bracket depth.")
}
if current_depth == 0 {
let close_bracket = tag::<_, _, CustomError<_>>("]")(input);
let close_bracket = tag::<_, _, CustomError>("]")(input);
if close_bracket.is_ok() {
return close_bracket;
}