From 55d13a9afde63c6d5fa2ac3c3d1543c4c0641b75 Mon Sep 17 00:00:00 2001 From: M3rs Date: Sat, 21 Jan 2017 21:20:24 -0600 Subject: [PATCH] refactor(uri): Remove extra authority logic Remove extra logic in authority getter method which handles default ports. --- src/uri.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uri.rs b/src/uri.rs index d409416f..a303f573 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -107,6 +107,7 @@ impl Uri { pub fn authority(&self) -> Option<&str> { if let Some(end) = self.authority_end { let index = self.scheme_end.map(|i| i + 3).unwrap_or(0); + Some(&self.source[index..end]) } else { None