From ad30a6ecc1b9081cde4f1ff4a92ea0ad915b4889 Mon Sep 17 00:00:00 2001 From: Serhiy Barhamon Date: Sat, 14 Oct 2023 13:29:06 +0200 Subject: [PATCH] remove extra defensive code --- src/toolkit/deserializer.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/toolkit/deserializer.rs b/src/toolkit/deserializer.rs index 060b38a..66621fe 100644 --- a/src/toolkit/deserializer.rs +++ b/src/toolkit/deserializer.rs @@ -19,11 +19,6 @@ where while current_position < input.len() { let slice = &input[current_position..]; current_position += slice.chars().next().unwrap().len_utf8(); - if maybe_nodes.is_empty() { - current_position = branch.fallback(slice)?; - fallback_position = current_position; - continue; - } for parser in &maybe_nodes { if let Some(node) = parser(slice, branch.context()) { while fallback_position != current_position - 1 {