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

@@ -94,9 +94,9 @@ fn pre<'b, 'g, 'r, 's>(
Some(x) if !WORD_CONSTITUENT_CHARACTERS.contains(x) => {}
Some(_) => {
// Not at start of line, cannot be a heading
return Err(nom::Err::Error(CustomError::MyError(MyError(
return Err(nom::Err::Error(CustomError::Static(
"Not a valid pre character for plain link.",
))));
)));
}
};
Ok((input, ()))
@@ -267,9 +267,7 @@ pub(crate) fn protocol<'b, 'g, 'r, 's>(
}
}
Err(nom::Err::Error(CustomError::MyError(MyError(
"NoLinkProtocol",
))))
Err(nom::Err::Error(CustomError::Static("NoLinkProtocol")))
}
#[cfg_attr(
@@ -341,9 +339,7 @@ fn impl_path_plain_end<'b, 'g, 'r, 's>(
}
}
Err(nom::Err::Error(CustomError::MyError(MyError(
"No path plain end",
))))
Err(nom::Err::Error(CustomError::Static("No path plain end")))
}
#[cfg_attr(
@@ -430,7 +426,7 @@ fn _path_plain_parenthesis_end<'s>(
return open_parenthesis;
}
}
Err(nom::Err::Error(CustomError::MyError(MyError(
Err(nom::Err::Error(CustomError::Static(
"No closing parenthesis",
))))
)))
}