aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Uri.cpp8
-rw-r--r--src/lib.rs2
2 files changed, 3 insertions, 7 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp
index 41ea1a4..ff161f3 100644
--- a/src/Uri.cpp
+++ b/src/Uri.cpp
@@ -270,12 +270,8 @@ namespace {
case ValidationState::COLON_BUT_NO_GROUPS_YET: {
if (c == ':') {
- if (doubleColonEncountered) {
- return false;
- } else {
- doubleColonEncountered = true;
- state = ValidationState::AFTER_DOUBLE_COLON;
- }
+ doubleColonEncountered = true;
+ state = ValidationState::AFTER_DOUBLE_COLON;
} else {
return false;
}
diff --git a/src/lib.rs b/src/lib.rs
index 2ac49cb..3b3a02c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -316,7 +316,7 @@ fn validate_ipv6_address(address: &str) -> Result<(), Error> {
},
ValidationState::ColonButNoGroupsYet => {
- if c != ':' || double_colon_encountered {
+ if c != ':' {
return Err(Error::IllegalCharacter);
}
double_colon_encountered = true;