From 55718a30f46ded8e26231bff9bc4beaba5f6aba1 Mon Sep 17 00:00:00 2001 From: AuracleTech Date: Mon, 12 Feb 2024 22:30:41 -0500 Subject: [PATCH] Fixing bug when external use --- Cargo.toml | 2 +- tests/experiment.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 766b4a5..a4414e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT" bytecount = "0.6.7" lazy_static = "1.4.0" regex = "1.10.3" -serde = { version = "1.0.196", optional = true } +serde = { version = "1.0.196", features = ["derive"], optional = true } [dev-dependencies] criterion = { version = "0.5.1", features = ["html_reports"] } diff --git a/tests/experiment.rs b/tests/experiment.rs index 91c1b50..2b5e49b 100644 --- a/tests/experiment.rs +++ b/tests/experiment.rs @@ -339,10 +339,7 @@ use vulkanalia::prelude::v1_0::*;"; fn serialization_collection() { let mut tokenizer = Tokenizer::new(SOURCE_SERIALIZATION, &DUOS_RUST); - let mut tokens = Vec::new(); - while let Some(token) = tokenizer.next().unwrap() { - tokens.push(token); - } + let tokens = tokenizer.tokenize_all().unwrap(); let serialized = serde_json::to_string(&tokens).unwrap(); let mut deserialized: Vec> = serde_json::from_str(&serialized).unwrap();