From 307af5679b11fa08848f161263b801759c288164 Mon Sep 17 00:00:00 2001 From: jackfiled Date: Sun, 1 Dec 2024 22:01:36 +0800 Subject: [PATCH] misc: remove unused import and format code. --- src/combinators/left_right_parsers.rs | 2 +- tests/lexical_parser_tests.rs | 3 +-- tests/zero_parser_tests.rs | 5 +---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/combinators/left_right_parsers.rs b/src/combinators/left_right_parsers.rs index ccfacfe..62ce08a 100644 --- a/src/combinators/left_right_parsers.rs +++ b/src/combinators/left_right_parsers.rs @@ -58,7 +58,7 @@ where #[cfg(test)] mod test { use crate::combinators::ParserExt; - use crate::parser::{parser_test_helper, Parser, ParserContext}; + use crate::parser::{parser_test_helper, Parser}; use crate::text::char_parser; #[test] diff --git a/tests/lexical_parser_tests.rs b/tests/lexical_parser_tests.rs index f27cdd8..4e94d5d 100644 --- a/tests/lexical_parser_tests.rs +++ b/tests/lexical_parser_tests.rs @@ -8,8 +8,7 @@ fn validate_tokens(input: &'static str, tokens: Vec) { let context = ParserContext::new(()); let word: Vec = input.chars().collect(); - let (_, actual_tokens) = - zero_lexical_parser(context.clone(),word.as_slice()).unwrap(); + let (_, actual_tokens) = zero_lexical_parser(context.clone(), word.as_slice()).unwrap(); dbg!(&tokens, &actual_tokens); assert_eq!(tokens.len(), actual_tokens.len()); diff --git a/tests/zero_parser_tests.rs b/tests/zero_parser_tests.rs index 6a577bb..81296b6 100644 --- a/tests/zero_parser_tests.rs +++ b/tests/zero_parser_tests.rs @@ -15,10 +15,7 @@ mod tokenizer; fn assert_lexical_parser( except: LexicalToken, - parser: fn( - Rc>>, - &[char], - ) -> ParserResult, + parser: fn(Rc>>, &[char]) -> ParserResult, input: &str, ) { let context = ParserContext::new(());