aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util/stream_context_factory_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-27 03:52:05 +0900
committernsfisis <nsfisis@gmail.com>2026-06-27 04:21:34 +0900
commit2b51554ff59d1e5cbf8dd2db65d278b0202a9102 (patch)
treef4d9b0abf4df9b5e363e3bd65511d70e3d5ada00 /crates/shirabe/tests/util/stream_context_factory_test.rs
parentcc07b5abb83a40d678401c335bdc49bb81b72c5f (diff)
downloadphp-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.gz
php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.zst
php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.zip
refactor: fix compiler warnings and clippy warnings
Diffstat (limited to 'crates/shirabe/tests/util/stream_context_factory_test.rs')
-rw-r--r--crates/shirabe/tests/util/stream_context_factory_test.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/shirabe/tests/util/stream_context_factory_test.rs b/crates/shirabe/tests/util/stream_context_factory_test.rs
index ad123aa..284077b 100644
--- a/crates/shirabe/tests/util/stream_context_factory_test.rs
+++ b/crates/shirabe/tests/util/stream_context_factory_test.rs
@@ -324,16 +324,16 @@ fn test_ssl_proxy() {
)]);
assert_eq!(expected_options, options);
} else {
- match StreamContextFactory::get_context(
- "http://example.org",
- IndexMap::new(),
- IndexMap::new(),
- ) {
- // The catch in PHP asserts the exception is a TransportException; the return type
- // here already guarantees that.
- Ok(_) => panic!(),
- Err(_) => {}
- }
+ // The catch in PHP asserts the exception is a TransportException; the return type
+ // here already guarantees that.
+ assert!(
+ StreamContextFactory::get_context(
+ "http://example.org",
+ IndexMap::new(),
+ IndexMap::new(),
+ )
+ .is_err()
+ );
}
}
}
@@ -351,7 +351,7 @@ fn test_ensure_thatfix_http_header_field_moves_content_type_to_end_of_options()
),
)]),
)]);
- let expected_header = vec![
+ let expected_header = [
s("User-agent: foo"),
s("X-Foo: bar"),
s("Authorization: Basic aW52YWxpZA=="),