Apply more suggestions.

This commit is contained in:
Tom Alexander
2023-10-16 17:58:52 -04:00
parent 1d329cc310
commit 4b6c717812
14 changed files with 103 additions and 129 deletions

View File

@@ -126,7 +126,7 @@ fn _header_end<'b, 'g, 'r, 's>(
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".into(),
"NoHeaderEnd",
))));
}
if current_depth < 0 {
@@ -187,9 +187,7 @@ fn _body_end<'b, 'g, 'r, 's>(
let current_depth = input.get_brace_depth() - starting_brace_depth;
if current_depth > 0 {
// Its impossible for the next character to end the body if we're any amount of brace deep
return Err(nom::Err::Error(CustomError::MyError(MyError(
"NoBodyEnd".into(),
))));
return Err(nom::Err::Error(CustomError::MyError(MyError("NoBodyEnd"))));
}
if current_depth < 0 {
// This shouldn't be possible because if depth is 0 then a closing brace should end the body.