aboutsummaryrefslogtreecommitdiffstats
path: root/src/subtokenize.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/subtokenize.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/subtokenize.rs b/src/subtokenize.rs
index 4a29a01..0623a37 100644
--- a/src/subtokenize.rs
+++ b/src/subtokenize.rs
@@ -15,6 +15,10 @@ pub fn subtokenize(events: Vec<Event>, codes: &[Code]) -> (Vec<Event>, bool) {
let mut link_to_info: HashMap<usize, (usize, usize, usize)> = HashMap::new();
let mut done = true;
+ if events.is_empty() {
+ return (events, true);
+ }
+
while index < events.len() {
let event = &events[index];