From 41fc406af206e21014eaaba94bcf6b1854f892b3 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 22 Jul 2022 15:03:15 +0200 Subject: Refactor to pass ints instead of vecs around --- src/construct/blank_line.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/construct/blank_line.rs') diff --git a/src/construct/blank_line.rs b/src/construct/blank_line.rs index cf51aec..5b6513d 100644 --- a/src/construct/blank_line.rs +++ b/src/construct/blank_line.rs @@ -60,8 +60,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { fn after(_tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { Code::None | Code::CarriageReturnLineFeed | Code::Char('\n' | '\r') => { - (State::Ok, Some(vec![code])) + (State::Ok, if matches!(code, Code::None) { 0 } else { 1 }) } - _ => (State::Nok, None), + _ => (State::Nok, 0), } } -- cgit