Convert to use regex-lite
This commit is contained in:
1 parent
a9d5c15bd9
commit
69bba560f0
2 files changed
+4
-4
No files matched your search
@@ -7,7 +7,7 @@ resolver = "2"
|
||||
crate_type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
regex = { default-features = false, features = ["std", "unicode-perl"], version = "1.9" }
|
||||
regex-lite = { version = "0.1" }
|
||||
jnix = { path = "jnix" }
|
||||
jnix-macros = "0.4"
|
||||
catch_panic = { path = "catch_panic" }
|
||||
|
||||
@@ -9,7 +9,7 @@ extern crate jnix_macros;
|
||||
extern crate log;
|
||||
extern crate once_cell;
|
||||
extern crate quick_xml;
|
||||
extern crate regex;
|
||||
extern crate regex_lite;
|
||||
extern crate tl;
|
||||
|
||||
use android_logger::Config;
|
||||
@@ -23,8 +23,8 @@ use tl::{Bytes, Node, NodeHandle, Parser, VDom};
|
||||
#[macro_export]
|
||||
macro_rules! regex {
|
||||
($re:literal $(,)?) => {{
|
||||
static RE: once_cell::sync::OnceCell<regex::Regex> = once_cell::sync::OnceCell::new();
|
||||
RE.get_or_init(|| regex::Regex::new($re).unwrap())
|
||||
static RE: once_cell::sync::OnceCell<regex_lite::Regex> = once_cell::sync::OnceCell::new();
|
||||
RE.get_or_init(|| regex_lite::Regex::new($re).unwrap())
|
||||
}};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user