Switch from lazy_static to once_cell

This commit is contained in:
Alexander Krotov
2020-10-17 15:25:47 +03:00
committed by link2xt
parent bf72ae4ccc
commit 67cddedf7e
11 changed files with 955 additions and 682 deletions

View File

@@ -2,12 +2,10 @@
//!
//! A module to remove HTML tags from the email text
use lazy_static::lazy_static;
use once_cell::sync::Lazy;
use quick_xml::events::{BytesEnd, BytesStart, BytesText};
lazy_static! {
static ref LINE_RE: regex::Regex = regex::Regex::new(r"(\r?\n)+").unwrap();
}
static LINE_RE: Lazy<regex::Regex> = Lazy::new(|| regex::Regex::new(r"(\r?\n)+").unwrap());
struct Dehtml {
strbuilder: String,