index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2022-11-12 22:04:38.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2022-11-12 22:04:38.0 +00:00:00
commit
ea4c24c76e3ef95f73aace155f3c49e5e798b607 [patch]
tree
002b0b7d5423909cd15ddf28e19807b9e579e884
parent
6f059fd06cef26266fab98cf1ee870a5df6c0524
download
ea4c24c76e3ef95f73aace155f3c49e5e798b607.tar.gz

style: reorder imports on tls module



Diff

 src/tls.rs | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/tls.rs b/src/tls.rs
index 3701411..96cea6b 100644
--- a/src/tls.rs
+++ b/src/tls.rs
@@ -1,6 +1,9 @@
// Handles requests over TLS
// -> Most of the file is borrowed from https://github.com/seanmonstar/warp/blob/master/src/tls.rs

use futures_util::ready;
use hyper::server::accept::Accept;
use hyper::server::conn::{AddrIncoming, AddrStream};
use std::fs::File;
use std::future::Future;
use std::io::{self, BufReader, Cursor, Read};
@@ -10,17 +13,13 @@ use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};

use futures_util::ready;
use hyper::server::accept::Accept;
use hyper::server::conn::{AddrIncoming, AddrStream};

use crate::transport::Transport;
use tokio_rustls::rustls::{
    server::{AllowAnyAnonymousOrAuthenticatedClient, AllowAnyAuthenticatedClient, NoClientAuth},
    Certificate, Error as TlsError, PrivateKey, RootCertStore, ServerConfig,
};

use crate::transport::Transport;

/// Represents errors that can occur building the TlsConfig
#[derive(Debug)]
pub enum TlsConfigError {