From 2c6ad1d7b8777eca1fc7e400aee76d67e697ebb8 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Thu, 9 Jan 2025 20:38:05 +0100 Subject: [PATCH] Update based on lints Signed-off-by: Jacob Kiers --- src/main.rs | 2 +- src/servers/protocol/tcp.rs | 2 +- src/servers/upstream_address.rs | 3 ++- src/update.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index c62981d..296eccd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use crate::config::ConfigV1; use crate::servers::Server; use std::io::{stderr, stdout, Write}; -use log::{debug, error, info}; +use log::{debug, error}; use pico_args::Arguments; use std::path::PathBuf; diff --git a/src/servers/protocol/tcp.rs b/src/servers/protocol/tcp.rs index 80763e7..67210f1 100644 --- a/src/servers/protocol/tcp.rs +++ b/src/servers/protocol/tcp.rs @@ -1,6 +1,6 @@ use crate::servers::protocol::tls::determine_upstream_name; use crate::servers::Proxy; -use log::{debug, error, info, trace, warn}; +use log::{debug, error, info, warn}; use std::error::Error; use std::sync::Arc; use tokio::net::{TcpListener, TcpStream}; diff --git a/src/servers/upstream_address.rs b/src/servers/upstream_address.rs index 6b2808c..855778c 100644 --- a/src/servers/upstream_address.rs +++ b/src/servers/upstream_address.rs @@ -4,7 +4,8 @@ use std::io::Result; use std::net::SocketAddr; use std::sync::Arc; use std::sync::RwLock; -use time::{Duration, Instant, OffsetDateTime}; +use std::time::Instant; +use time::{Duration, OffsetDateTime}; #[derive(Debug, Clone, Default)] pub(crate) struct UpstreamAddress { diff --git a/src/update.rs b/src/update.rs index 8cad614..f7d3915 100644 --- a/src/update.rs +++ b/src/update.rs @@ -1,4 +1,4 @@ -use self_update::{cargo_crate_version, version}; +use self_update::cargo_crate_version; pub(crate) fn update() { println!("Updating to the latest version...");