aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/http/proxy_manager.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/http/proxy_manager.rs')
-rw-r--r--crates/shirabe/src/util/http/proxy_manager.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/shirabe/src/util/http/proxy_manager.rs b/crates/shirabe/src/util/http/proxy_manager.rs
index 319a2c4..e2838e6 100644
--- a/crates/shirabe/src/util/http/proxy_manager.rs
+++ b/crates/shirabe/src/util/http/proxy_manager.rs
@@ -45,9 +45,15 @@ impl ProxyManager {
self.http_proxy.is_some() || self.https_proxy.is_some()
}
- pub fn get_proxy_for_request(&self, request_url: &str) -> Result<RequestProxy, TransportException> {
+ pub fn get_proxy_for_request(
+ &self,
+ request_url: &str,
+ ) -> Result<RequestProxy, TransportException> {
if let Some(ref error) = self.error {
- return Err(TransportException::new(format!("Unable to use a proxy: {}", error)));
+ return Err(TransportException::new(format!(
+ "Unable to use a proxy: {}",
+ error
+ )));
}
let scheme = request_url.split("://").next().unwrap_or("").to_string();