From 82221ba13d2a4ccd119f280aaa3cea9ca2c8fdaf Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 1 Aug 2022 10:17:25 +0200 Subject: Refactor some states --- src/construct/html_text.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/construct/html_text.rs') diff --git a/src/construct/html_text.rs b/src/construct/html_text.rs index 51beda5..8a44c29 100644 --- a/src/construct/html_text.rs +++ b/src/construct/html_text.rs @@ -169,7 +169,7 @@ fn comment_open_inside(tokenizer: &mut Tokenizer) -> State { /// [html_flow]: crate::construct::html_flow fn comment_start(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { - None | Some(b'>') => State::Nok, + Some(b'>') => State::Nok, Some(b'-') => { tokenizer.consume(); State::Fn(Box::new(comment_start_dash)) @@ -193,7 +193,7 @@ fn comment_start(tokenizer: &mut Tokenizer) -> State { /// [html_flow]: crate::construct::html_flow fn comment_start_dash(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { - None | Some(b'>') => State::Nok, + Some(b'>') => State::Nok, _ => comment(tokenizer), } } -- cgit