fix it again because of tokio updates
cargo devel CI / cargo CI (push) Successful in 1m36s Details

This commit is contained in:
Christoph J. Scherr 2024-08-21 12:16:35 +02:00
parent 7ec2e55ec5
commit 670a4bd192
4 changed files with 14 additions and 11 deletions

View File

@ -17,12 +17,12 @@ anyhow = "1.0.79"
clap = "4.4.18" clap = "4.4.18"
clap-num = "1.0.2" clap-num = "1.0.2"
clap-verbosity-flag = "2.1.2" clap-verbosity-flag = "2.1.2"
libpt = { version = "0.3.11", features = ["net"] }
thiserror = "1.0.56" thiserror = "1.0.56"
tokio = { version = "1.35.1", features = ["net", "rt", "macros"] } tokio = { version = "1.35.1", features = ["net", "rt-multi-thread", "macros", "time", "io-util"] }
rustls-pemfile = "2.0.0" rustls-pemfile = "2.0.0"
tokio-rustls = "0.25.0" tokio-rustls = "0.25.0"
webpki-roots = "0.26.0" webpki-roots = "0.26.0"
libpt = { version = "0.6.0", features = ["log"] }
[features] [features]
default = ["server"] default = ["server"]

View File

@ -3,18 +3,14 @@ use std::{fs::File, io::BufReader, sync::Arc};
use crate::{common::decode, Config}; use crate::{common::decode, Config};
use anyhow;
use libpt::log::{error, info, trace}; use libpt::log::{error, info, trace};
use rustls_pemfile::certs; use rustls_pemfile::certs;
use tokio::{ use tokio::io::{AsyncReadExt, AsyncWriteExt};
io::{AsyncReadExt, AsyncWriteExt}, use tokio::net::TcpStream;
net::TcpStream,
};
use tokio_rustls::{ use tokio_rustls::{
rustls::{self, pki_types}, rustls::{self, pki_types},
TlsConnector, TlsStream, TlsConnector, TlsStream,
}; };
use webpki_roots;
const BUF_SIZE: usize = 512; const BUF_SIZE: usize = 512;

View File

@ -74,10 +74,17 @@ impl Cli {
} }
}; };
if cli.meta { if cli.meta {
Logger::init(None, Some(ll), true).expect("could not initialize Logger"); let _ = Logger::builder()
.set_level(ll)
.display_filename(true)
.build()
.expect("could not initialize Logger");
} else { } else {
// less verbose version // less verbose version
Logger::init_mini(Some(ll)).expect("could not initialize Logger"); let _ = Logger::builder()
.set_level(ll)
.build()
.expect("could not initialize Logger");
} }
return cli; return cli;
} }

View File

@ -13,7 +13,7 @@ use rustls_pemfile::{certs, private_key};
use tokio::{ use tokio::{
io::{AsyncReadExt, AsyncWriteExt}, io::{AsyncReadExt, AsyncWriteExt},
net::{TcpListener, TcpStream}, net::{TcpListener, TcpStream},
time::{self}, time,
}; };
use tokio_rustls::{rustls, TlsAcceptor}; use tokio_rustls::{rustls, TlsAcceptor};