From 849ee8fbdfba869f03b9083bb856f401c72eb0c3 Mon Sep 17 00:00:00 2001 From: Prabhjyot Singh Sodhi Date: Tue, 1 Sep 2015 08:38:42 +0530 Subject: [PATCH 1/2] removing unnecessary clones --- components/net/http_loader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index cf5078a1a4f..41e4010ada1 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -183,7 +183,7 @@ impl HttpRequestFactory for NetworkHttpRequestFactory { context.set_CA_file(&resources_dir_path().join("certs")).unwrap(); let connector = HttpsConnector::new(Openssl { context: Arc::new(context) }); - let connection = Request::with_connector(method.clone(), url.clone(), &connector); + let connection = Request::with_connector(method, url.clone(), &connector); let ssl_err_string = "Some(OpenSslErrors([UnknownError { library: \"SSL routines\", \ function: \"SSL3_GET_SERVER_CERTIFICATE\", \ From afcda46cbe7a925c9b5bd5969ec24d042b92a9ff Mon Sep 17 00:00:00 2001 From: Prabhjyot Singh Sodhi Date: Tue, 1 Sep 2015 13:44:54 +0530 Subject: [PATCH 2/2] Removing unnecessary url clones --- components/net/http_loader.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index 41e4010ada1..4c257513526 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -200,7 +200,7 @@ impl HttpRequestFactory for NetworkHttpRequestFactory { ) => { return Err( LoadError::Ssl( - url.clone(), + url, format!("ssl error {:?}: {:?} {:?}", io_error.kind(), io_error.description(), @@ -209,7 +209,7 @@ impl HttpRequestFactory for NetworkHttpRequestFactory { ) }, Err(e) => { - return Err(LoadError::Connection(url.clone(), e.description().to_string())) + return Err(LoadError::Connection(url, e.description().to_string())) } };