From 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Jun 2026 03:52:05 +0900 Subject: refactor: fix compiler warnings and clippy warnings --- .../tests/util/stream_context_factory_test.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'crates/shirabe/tests/util/stream_context_factory_test.rs') 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=="), -- cgit v1.3.1