From f8bfc64e12631e569002b0f9afa097bc8d752a74 Mon Sep 17 00:00:00 2001 From: Charles Edward Gagnon Date: Sun, 1 Sep 2024 20:25:45 -0400 Subject: [PATCH] remove itertools better impl with collect --- Cargo.toml | 1 - src/consts.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a9408d9..0622c82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ readme = "README.md" bincode = "1.3" either = "1.11" fnv = "1" -itertools = ">=0.10, <= 0.12" once_cell = "1" nom = "7.1" quick-xml = ">=0.28, <= 0.31" diff --git a/src/consts.rs b/src/consts.rs index c59eb01..a0ac5be 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -15,7 +15,6 @@ #![allow(unused)] use fnv::{FnvHashMap, FnvHashSet}; -use itertools::Itertools; use once_cell::sync::Lazy; use regex::{Regex, RegexBuilder}; @@ -248,7 +247,7 @@ pub const PLUS_CHARS: &str = r"\+\x{FF0B}"; pub static VALID_ALPHA: Lazy = Lazy::new(|| { let mut string = String::new(); let clean = Regex::new(r"[, \[\]]").unwrap(); - let alpha = ALPHA_MAPPINGS.keys().join(""); + let alpha = ALPHA_MAPPINGS.keys().collect::(); string.push_str(&clean.replace(&alpha, "")); string.push_str(&clean.replace(&alpha.to_lowercase(), ""));