aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f3b895a..6cbc682 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -784,12 +784,9 @@ impl Uri {
pub fn parse(uri_string: &str) -> Result<Uri, Error> {
let (scheme, rest) = Self::parse_scheme(uri_string)?;
-
- let path_end = rest.find(&['?', '#'][..])
+ let path_end = rest
+ .find(&['?', '#'][..])
.unwrap_or_else(|| rest.len());
-// let path_end = rest.find(|c| "?#".find(c).is_some())
-// .unwrap_or(rest.len());
-
let authority_and_path_string = &rest[0..path_end];
let query_and_or_fragment = &rest[path_end..];
let (authority, path) = Self::split_authority_from_path_and_parse_them(authority_and_path_string)?;