diff options
| author | Vincent Prouillet | 2017-01-16 18:46:49 +0900 |
|---|---|---|
| committer | Vincent Prouillet | 2017-01-16 18:46:49 +0900 |
| commit | 3302d261744c12001ec2cd980fffd32a829185aa (patch) | |
| tree | 2e3c11417754330bfaf66ff7788417817d5c5e65 | |
| parent | a0f2b4c0d4820bfdcc13c7abdfdc7802d9f6d493 (diff) | |
| download | validator-3302d261744c12001ec2cd980fffd32a829185aa.tar.bz2 | |
Update regex and drop proc_macro feature, its stable
| -rw-r--r-- | validator/Cargo.toml | 2 | ||||
| -rw-r--r-- | validator/src/email.rs | 4 | ||||
| -rw-r--r-- | validator_derive/src/lib.rs | 1 | ||||
| -rw-r--r-- | validator_derive/tests/test_derive.rs | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/validator/Cargo.toml b/validator/Cargo.toml index 618c114..d622f9e 100644 --- a/validator/Cargo.toml +++ b/validator/Cargo.toml @@ -10,6 +10,6 @@ keywords = ["validation", "api", "validator"] [dependencies] url = "1.2" -regex = "0.1" +regex = "0.2" lazy_static = "0.2" idna = "0.1" diff --git a/validator/src/email.rs b/validator/src/email.rs index d7cd084..205d89f 100644 --- a/validator/src/email.rs +++ b/validator/src/email.rs @@ -49,8 +49,8 @@ fn validate_domain_part(domain_part: &str) -> bool { // maybe we have an ip as a domain? match EMAIL_LITERAL_RE.captures(domain_part) { Some(caps) => { - match caps.at(1) { - Some(c) => validate_ip(c), + match caps.get(1) { + Some(c) => validate_ip(c.as_str()), None => false, } } diff --git a/validator_derive/src/lib.rs b/validator_derive/src/lib.rs index cdc244d..eaf82e1 100644 --- a/validator_derive/src/lib.rs +++ b/validator_derive/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(proc_macro, proc_macro_lib)] #![recursion_limit = "128"] diff --git a/validator_derive/tests/test_derive.rs b/validator_derive/tests/test_derive.rs index 7cc63eb..9a11b79 100644 --- a/validator_derive/tests/test_derive.rs +++ b/validator_derive/tests/test_derive.rs @@ -1,4 +1,4 @@ -#![feature(proc_macro, attr_literals)] +#![feature(attr_literals)] #[macro_use] extern crate validator_derive; extern crate validator; |
