Browse Source

Add #[non_exhaustive] to Args for semver compatibility

pull/245/head
Alexander Olkhovoy 2 months ago
parent
commit
d2d155d8cf
  1. 1
      src/args.rs
  2. 2
      src/socks.rs

1
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,

2
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;

Loading…
Cancel
Save