summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml5
-rw-r--r--src/lib.rs2
2 files changed, 6 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 8e381e3..083a7b9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,4 +7,7 @@ homepage = "https://jturnerusa.dev/cgit/mon"
repository = "https://jturnerusa.dev/cgit/mon"
[dependencies]
-regex = "1.12.2" \ No newline at end of file
+regex = { version = "1.12.2", optional = true }
+
+[features]
+regex = ["dep:regex"] \ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs
index 7221769..d963e36 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1053,6 +1053,7 @@ where
r#if(|_| true)
}
+#[cfg(feature = "regex")]
pub mod str {
use super::*;
@@ -1099,6 +1100,7 @@ mod test {
}
#[test]
+ #[cfg(feature = "regex")]
fn test_regex_parser() {
let it = InputIter::new("abc 123");