Continue removing MyError.
This commit is contained in:
@@ -130,9 +130,7 @@ fn _header_end<'b, 'g, 'r, 's>(
|
||||
let current_depth = input.get_bracket_depth() - starting_bracket_depth;
|
||||
if current_depth > 0 {
|
||||
// Its impossible for the next character to end the header if we're any amount of bracket deep
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"NoHeaderEnd",
|
||||
))));
|
||||
return Err(nom::Err::Error(CustomError::Static("NoHeaderEnd")));
|
||||
}
|
||||
if current_depth < 0 {
|
||||
// This shouldn't be possible because if depth is 0 then a closing bracket should end the header.
|
||||
@@ -182,9 +180,7 @@ fn _argument_end<'b, 'g, 'r, 's>(
|
||||
let current_depth = input.get_parenthesis_depth() - starting_parenthesis_depth;
|
||||
if current_depth > 0 {
|
||||
// Its impossible for the next character to end the argument if we're any amount of parenthesis deep
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"NoArgumentEnd",
|
||||
))));
|
||||
return Err(nom::Err::Error(CustomError::Static("NoArgumentEnd")));
|
||||
}
|
||||
if current_depth < 0 {
|
||||
// This shouldn't be possible because if depth is 0 then a closing parenthesis should end the argument.
|
||||
|
||||
Reference in New Issue
Block a user