From d2d155d8cfaa0c0be1e84d003adb72014bba8751 Mon Sep 17 00:00:00 2001 From: Alexander Olkhovoy Date: Tue, 7 Apr 2026 13:11:12 +0300 Subject: [PATCH] Add #[non_exhaustive] to Args for semver compatibility --- src/args.rs | 1 + src/socks.rs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/args.rs b/src/args.rs index 61c649d..405fca1 100644 --- a/src/args.rs +++ b/src/args.rs @@ -20,6 +20,7 @@ fn about_info() -> &'static str { } #[derive(Debug, Clone, clap::Parser, serde::Serialize, serde::Deserialize)] +#[non_exhaustive] #[command(author, version = version_info!(), about = about_info(), long_about = None)] pub struct Args { /// Proxy URL in the form proto://[username[:password]@]host:port, diff --git a/src/socks.rs b/src/socks.rs index 48daf7c..224b48a 100644 --- a/src/socks.rs +++ b/src/socks.rs @@ -173,7 +173,6 @@ impl SocksProxyImpl { fn send_auth_data(&mut self) -> std::io::Result<()> { let tmp = UserKey::default(); let credentials = self.credentials.as_ref().unwrap_or(&tmp); - let username = if self.embed_session_info { let proto = match self.command { protocol::Command::Connect => "tcp", @@ -184,7 +183,6 @@ impl SocksProxyImpl { } else { credentials.username.clone() }; - let request = password_method::Request::new(&username, &credentials.password); request.write_to_stream(&mut self.server_outbuf)?; self.state = SocksState::ReceiveAuthResponse;