diff options
-rw-r--r-- | components/net/http_loader.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index e1f0c1c69f3..6bc5e990096 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -64,7 +64,8 @@ fn load(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>, cooki // real URL that should be used for which the source is to be viewed. // Change our existing URL to that and keep note that we are viewing // the source rather than rendering the contents of the URL. - let viewing_source = if &*url.scheme == "view-source" { + let viewing_source = url.scheme == "view-source"; + if viewing_source { let inner_url = load_data.url.non_relative_scheme_data().unwrap(); url = Url::parse(inner_url).unwrap(); match &*url.scheme { @@ -75,10 +76,7 @@ fn load(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>, cooki return; } }; - true - } else { - false - }; + } // Loop to handle redirects. loop { |