diff --git a/Cargo.lock b/Cargo.lock index b952661..6ee97ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -520,7 +520,6 @@ dependencies = [ name = "string_regex_email" version = "0.1.0" dependencies = [ - "lazy_static", "nutype", "regex", ] diff --git a/nutype_macros/src/common/gen/mod.rs b/nutype_macros/src/common/gen/mod.rs index a6a22ae..c6448b5 100644 --- a/nutype_macros/src/common/gen/mod.rs +++ b/nutype_macros/src/common/gen/mod.rs @@ -213,6 +213,7 @@ pub trait GenerateNewtype { /// happens in 2 stages: /// * &str -> inner type (parsing) /// * inner type -> nutype (validation) + /// /// But for the String based types there is no first stage, so the parse error is the same as /// validation error. const HAS_DEDICATED_PARSE_ERROR: bool = true; diff --git a/test_suite/tests/string.rs b/test_suite/tests/string.rs index 2f93e23..e29c963 100644 --- a/test_suite/tests/string.rs +++ b/test_suite/tests/string.rs @@ -601,7 +601,6 @@ mod validation_with_regex { use once_cell::sync::Lazy; use regex::Regex; - static PHONE_REGEX_LAZY_LOCK: LazyLock = LazyLock::new(|| Regex::new("^[0-9]{3}-[0-9]{3}$").unwrap());