refactor(uri): remove extra scheme condition from Uri::parse
Scheme check never true given preceeding else if
This commit is contained in:
committed by
Sean McArthur
parent
a2a647b316
commit
528afb89a8
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user