From df3513afa729e433a4f3e4195ef98ce408ccd3bf Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Tue, 1 Oct 2024 10:39:15 +0200 Subject: [PATCH] clippy n fmt --- .../src/bin/tcp_ssl_fixed_upgrade_client.rs | 26 +++++++++++-------- .../src/bin/tcp_ssl_upgrade_client.rs | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/iris-mpc-upgrade/src/bin/tcp_ssl_fixed_upgrade_client.rs b/iris-mpc-upgrade/src/bin/tcp_ssl_fixed_upgrade_client.rs index 049f6f196..2da8e30db 100644 --- a/iris-mpc-upgrade/src/bin/tcp_ssl_fixed_upgrade_client.rs +++ b/iris-mpc-upgrade/src/bin/tcp_ssl_fixed_upgrade_client.rs @@ -15,19 +15,21 @@ use iris_mpc_upgrade::{ use mpc_uniqueness_check::{bits::Bits, distance::EncodedBits}; use rand::SeedableRng; use rand_chacha::ChaCha20Rng; -use std::{pin::Pin, time::Duration, fs, io::{self, Error as IoError}}; -use std::io::ErrorKind; -use std::sync::Arc; -use rustls::pki_types::ServerName; +use rustls::{pki_types::ServerName, ClientConfig, RootCertStore}; +use rustls_pemfile::certs; +use std::{ + fs, + io::{self, Error as IoError, ErrorKind}, + pin::Pin, + sync::Arc, + time::Duration, +}; use tokio::{ io::{AsyncReadExt, AsyncWriteExt}, net::TcpStream, time::timeout, }; -use rustls::{ClientConfig, RootCertStore}; -use tokio_rustls::{client::TlsStream, TlsConnector, rustls}; -use rustls_pemfile::certs; - +use tokio_rustls::{client::TlsStream, rustls, TlsConnector}; use tracing::error; async fn prepare_tls_stream_for_writing(address: &str) -> eyre::Result> { @@ -35,7 +37,7 @@ async fn prepare_tls_stream_for_writing(address: &str) -> eyre::Result eyre::Result eyre::Result = tls_connector.connect(address, stream).await?;