aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/tests/fetch.rs
diff options
context:
space:
mode:
authoreri <eri@inventati.org>2024-03-10 16:34:16 +0100
committerGitHub <noreply@github.com>2024-03-10 15:34:16 +0000
commit67b277c992d59dfed7d9177d4a62a1517d28a5b5 (patch)
tree951a1e41c34e05b2e72c5ae3065837a3db978624 /components/net/tests/fetch.rs
parent099bb0fa194ad9a27c6e3512163eaaf42d91bbe6 (diff)
downloadservo-67b277c992d59dfed7d9177d4a62a1517d28a5b5.tar.gz
servo-67b277c992d59dfed7d9177d4a62a1517d28a5b5.zip
clippy: fix warnings in components/net (#31564)
* clippy: fix some warnings in components/net * fix: review comments * fix: tidy
Diffstat (limited to 'components/net/tests/fetch.rs')
-rw-r--r--components/net/tests/fetch.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs
index ab05a954e9e..c4409e7d6d5 100644
--- a/components/net/tests/fetch.rs
+++ b/components/net/tests/fetch.rs
@@ -385,7 +385,7 @@ fn test_cors_preflight_cache_fetch() {
static ACK: &'static [u8] = b"ACK";
let state = Arc::new(AtomicUsize::new(0));
let counter = state.clone();
- let mut cache = CorsCache::new();
+ let mut cache = CorsCache::default();
let handler = move |request: HyperRequest<Body>, response: &mut HyperResponse<Body>| {
if request.method() == Method::OPTIONS && state.clone().fetch_add(1, Ordering::SeqCst) == 0
{
@@ -757,7 +757,7 @@ fn test_fetch_with_hsts() {
let (server, url) = make_ssl_server(handler);
let mut context = FetchContext {
- state: Arc::new(HttpState::new()),
+ state: Arc::new(HttpState::default()),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: None,
filemanager: Arc::new(Mutex::new(FileManager::new(
@@ -816,7 +816,7 @@ fn test_load_adds_host_to_hsts_list_when_url_is_https() {
url.as_mut_url().set_scheme("https").unwrap();
let mut context = FetchContext {
- state: Arc::new(HttpState::new()),
+ state: Arc::new(HttpState::default()),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: None,
filemanager: Arc::new(Mutex::new(FileManager::new(
@@ -873,7 +873,7 @@ fn test_fetch_self_signed() {
url.as_mut_url().set_scheme("https").unwrap();
let mut context = FetchContext {
- state: Arc::new(HttpState::new()),
+ state: Arc::new(HttpState::default()),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: None,
filemanager: Arc::new(Mutex::new(FileManager::new(