refactor(uri): remove extra scheme condition from Uri::parse

Scheme check never true given preceeding else if
This commit is contained in:
Niek Sanders
2017-10-04 01:30:59 +02:00
committed by Sean McArthur
parent a2a647b316
commit 528afb89a8

View File

@@ -90,7 +90,7 @@ impl Uri {
query_start: query,
fragment_start: fragment,
})
} else if (s.contains("/") || s.contains("?")) && !s.contains("://") {
} else if s.contains("/") || s.contains("?") {
// last possibility is authority-form, above are illegal characters
Err(UriError(ErrorKind::Malformed))
} else {