Solve the rest of the compiler warnings.

This commit is contained in:
Tom Alexander
2023-04-21 18:42:31 -04:00
parent a1724dae52
commit 18323a2b43
13 changed files with 16 additions and 31 deletions

View File

@@ -34,8 +34,8 @@ pub fn comment<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str,
let parser_context = context.with_additional_node(ContextElement::Context("comment"));
let comment_line_matcher = parser_with_context!(comment_line)(&parser_context);
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
let (remaining, first_line) = comment_line_matcher(input)?;
let (remaining, remaining_lines) =
let (remaining, _first_line) = comment_line_matcher(input)?;
let (remaining, _remaining_lines) =
many0(preceded(not(exit_matcher), comment_line_matcher))(remaining)?;
let (remaining, _trailing_ws) =

View File

@@ -1,5 +1,3 @@
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use crate::parser::comment::comment;
use crate::parser::element_parser::element;

View File

@@ -12,8 +12,6 @@ use super::lesser_block::verse_block;
use super::paragraph::paragraph;
use super::plain_list::plain_list;
use super::Context;
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use crate::parser::parser_with_context::parser_with_context;
use crate::parser::table::org_mode_table;

View File

@@ -1,5 +1,3 @@
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use nom::branch::alt;
use nom::bytes::complete::is_not;

View File

@@ -1,5 +1,3 @@
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use nom::combinator::map;
use nom::combinator::not;

View File

@@ -1,5 +1,3 @@
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use nom::branch::alt;
use nom::combinator::eof;

View File

@@ -122,7 +122,7 @@ pub fn plain_list<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s s
return Err(nom::Err::Error(CustomError::MyError(MyError(
"Should be unreachable.",
))));
unreachable!();
// unreachable!();
}
};
}

View File

@@ -41,7 +41,7 @@ pub fn property_drawer<'r, 's>(
}
let (
remaining,
(_start_of_line, _leading_whitespace, open_tag, _trailing_whitespace, _line_ending),
(_start_of_line, _leading_whitespace, _open_tag, _trailing_whitespace, _line_ending),
) = tuple((
parser_with_context!(start_of_line)(context),
space0,
@@ -87,7 +87,7 @@ fn node_property<'r, 's>(
context: Context<'r, 's>,
input: &'s str,
) -> Res<&'s str, NodeProperty<'s>> {
let (remaining, (_start_of_line, _leading_whitespace, _open_colon, name, _close_colon)) =
let (remaining, (_start_of_line, _leading_whitespace, _open_colon, _name, _close_colon)) =
tuple((
parser_with_context!(start_of_line)(context),
space0,

View File

@@ -1,5 +1,3 @@
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use nom::branch::alt;
use nom::bytes::complete::is_not;