File tree 3 files changed +4
-20
lines changed
3 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -91,16 +91,12 @@ jobs:
91
91
92
92
include :
93
93
- name : linux / stable
94
- test-features : " --features __internal_proxy_sys_no_cache"
95
94
- name : linux / beta
96
95
rust : beta
97
- test-features : " --features __internal_proxy_sys_no_cache"
98
96
# - name: linux / nightly
99
97
# rust: nightly
100
- # test-features: "--features __internal_proxy_sys_no_cache"
101
98
- name : macOS / stable
102
99
os : macOS-latest
103
- test-features : " --features __internal_proxy_sys_no_cache"
104
100
105
101
- name : windows / stable-x86_64-msvc
106
102
os : windows-latest
@@ -272,7 +268,7 @@ jobs:
272
268
run : |
273
269
cargo clean
274
270
cargo update -Z minimal-versions
275
- cargo update -p proc-macro2 --precise 1.0.62
271
+ cargo update -p proc-macro2 --precise 1.0.87
276
272
cargo check
277
273
cargo check --all-features
278
274
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ use crate::into_url::{IntoUrl, IntoUrlSealed};
7
7
use crate :: Url ;
8
8
use http:: { header:: HeaderValue , Uri } ;
9
9
use ipnet:: IpNet ;
10
- use once_cell:: sync:: Lazy ;
11
10
use percent_encoding:: percent_decode;
12
11
use std:: collections:: HashMap ;
13
12
use std:: env;
@@ -280,13 +279,9 @@ impl Proxy {
280
279
}
281
280
282
281
pub ( crate ) fn system ( ) -> Proxy {
283
- let mut proxy = if cfg ! ( feature = "__internal_proxy_sys_no_cache" ) {
284
- Proxy :: new ( Intercept :: System ( Arc :: new ( get_sys_proxies (
285
- get_from_platform ( ) ,
286
- ) ) ) )
287
- } else {
288
- Proxy :: new ( Intercept :: System ( SYS_PROXIES . clone ( ) ) )
289
- } ;
282
+ let mut proxy = Proxy :: new ( Intercept :: System ( Arc :: new ( get_sys_proxies (
283
+ get_from_platform ( ) ,
284
+ ) ) ) ) ;
290
285
proxy. no_proxy = NoProxy :: from_env ( ) ;
291
286
proxy
292
287
}
@@ -876,9 +871,6 @@ impl Dst for Uri {
876
871
}
877
872
}
878
873
879
- static SYS_PROXIES : Lazy < Arc < SystemProxyMap > > =
880
- Lazy :: new ( || Arc :: new ( get_sys_proxies ( get_from_platform ( ) ) ) ) ;
881
-
882
874
/// Get system proxies information.
883
875
///
884
876
/// All platforms will check for proxy settings via environment variables.
Original file line number Diff line number Diff line change @@ -163,7 +163,6 @@ async fn test_no_proxy() {
163
163
assert_eq ! ( res. status( ) , reqwest:: StatusCode :: OK ) ;
164
164
}
165
165
166
- #[ cfg_attr( not( feature = "__internal_proxy_sys_no_cache" ) , ignore) ]
167
166
#[ tokio:: test]
168
167
async fn test_using_system_proxy ( ) {
169
168
let url = "http://not.a.real.sub.hyper.rs/prox" ;
@@ -175,9 +174,6 @@ async fn test_using_system_proxy() {
175
174
async { http:: Response :: default ( ) }
176
175
} ) ;
177
176
178
- // Note: we're relying on the `__internal_proxy_sys_no_cache` feature to
179
- // check the environment every time.
180
-
181
177
// save system setting first.
182
178
let system_proxy = env:: var ( "http_proxy" ) ;
183
179
// set-up http proxy.
You can’t perform that action at this time.
0 commit comments