Apply clippy fix.

This commit is contained in:
Christopher Chong
2024-07-01 18:48:33 +08:00
parent 4d78e007c6
commit e361a86e6a
3 changed files with 5 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ async fn alpn_test_error(
for version in tls_client::ALL_VERSIONS {
let mut client_config = make_client_config_with_versions(KeyType::Rsa, &[version]);
client_config.alpn_protocols = client_protos.clone();
client_config.alpn_protocols.clone_from(&client_protos);
let (mut client, mut server) =
make_pair_for_arc_configs(&Arc::new(client_config), &server_config).await;
@@ -890,8 +890,7 @@ async fn client_error_is_sticky() {
#[tokio::test]
async fn client_is_send() {
let (client, _) = make_pair(KeyType::Rsa).await;
&client as &dyn Send;
let (_client, _) = make_pair(KeyType::Rsa).await;
}
#[tokio::test]
@@ -1374,6 +1373,7 @@ async fn server_streamowned_read() {
}
}
#[allow(dead_code)]
struct FailsWrites {
errkind: io::ErrorKind,
after: usize,

View File

@@ -50,7 +50,7 @@ fn serialized(f: impl FnOnce()) {
});
let mutex = unsafe { MUTEX.as_mut() };
let _guard = mutex.unwrap().lock().unwrap();
let _guard = mutex.unwrap().get_mut().unwrap();
// XXX: NOT thread safe.
env::set_var("SSLKEYLOGFILE", "./sslkeylogfile.txt");

View File

@@ -21,6 +21,7 @@ use crate::{MpcTlsCommonConfig, TlsRole};
/// Builds the components for MPC-TLS.
// TODO: Better dependency injection!!
#[allow(clippy::too_many_arguments, clippy::type_complexity)]
pub fn build_components<Ctx, T, OTS, OTR>(
role: TlsRole,
config: &MpcTlsCommonConfig,