From 9c4c3eaa297eecf5648e92bcdb73003838eaf98f Mon Sep 17 00:00:00 2001 From: Vladislav Yaroslavlev Date: Wed, 18 Feb 2026 02:59:57 +0300 Subject: [PATCH] fix: resolve clippy warnings --- src/crypto/mod.rs | 2 +- src/protocol/constants.rs | 3 +-- src/protocol/obfuscation.rs | 1 - src/protocol/tls.rs | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 40951c6..702e23d 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -5,5 +5,5 @@ pub mod hash; pub mod random; pub use aes::{AesCtr, AesCbc}; -pub use hash::{sha256, sha256_hmac, sha1, md5, crc32, derive_middleproxy_keys, build_middleproxy_prekey}; +pub use hash::{sha256, sha256_hmac, crc32, derive_middleproxy_keys, build_middleproxy_prekey}; pub use random::SecureRandom; diff --git a/src/protocol/constants.rs b/src/protocol/constants.rs index 86cd2bd..a2d1fb3 100644 --- a/src/protocol/constants.rs +++ b/src/protocol/constants.rs @@ -1,6 +1,6 @@ //! Protocol constants and datacenter addresses -use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; +use std::net::{IpAddr, Ipv4Addr}; use std::sync::LazyLock; // ============= Telegram Datacenters ============= @@ -202,7 +202,6 @@ pub static RESERVED_NONCE_CONTINUES: &[[u8; 4]] = &[ // ============= RPC Constants (for Middle Proxy) ============= /// RPC Proxy Request - /// RPC Flags (from Erlang mtp_rpc.erl) pub const RPC_FLAG_NOT_ENCRYPTED: u32 = 0x2; pub const RPC_FLAG_HAS_AD_TAG: u32 = 0x8; diff --git a/src/protocol/obfuscation.rs b/src/protocol/obfuscation.rs index 4d2197d..4325a37 100644 --- a/src/protocol/obfuscation.rs +++ b/src/protocol/obfuscation.rs @@ -2,7 +2,6 @@ use zeroize::Zeroize; use crate::crypto::{sha256, AesCtr}; -use crate::error::Result; use super::constants::*; /// Obfuscation parameters from handshake diff --git a/src/protocol/tls.rs b/src/protocol/tls.rs index 520b6ea..1421e92 100644 --- a/src/protocol/tls.rs +++ b/src/protocol/tls.rs @@ -5,7 +5,6 @@ //! actually carries MTProto authentication data. use crate::crypto::{sha256_hmac, SecureRandom}; -use crate::error::{ProxyError, Result}; use super::constants::*; use std::time::{SystemTime, UNIX_EPOCH}; use num_bigint::BigUint;