mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-07 00:13:33 +00:00
make clippy happy
This commit is contained in:
@@ -116,8 +116,10 @@ pub async fn create(config: Config) -> io::Result<Server> {
|
||||
connect_opts.tcp.keepalive = config.keep_alive.or(Some(LOCAL_DEFAULT_KEEPALIVE_TIMEOUT));
|
||||
context.set_connect_opts(connect_opts);
|
||||
|
||||
let mut accept_opts = AcceptOpts::default();
|
||||
accept_opts.ipv6_only = config.ipv6_only;
|
||||
let mut accept_opts = AcceptOpts {
|
||||
ipv6_only: config.ipv6_only,
|
||||
..Default::default()
|
||||
};
|
||||
accept_opts.tcp.send_buffer_size = config.inbound_send_buffer_size;
|
||||
accept_opts.tcp.recv_buffer_size = config.inbound_recv_buffer_size;
|
||||
accept_opts.tcp.nodelay = config.no_delay;
|
||||
|
||||
@@ -52,8 +52,10 @@ pub async fn run(config: Config) -> io::Result<()> {
|
||||
connect_opts.tcp.fastopen = config.fast_open;
|
||||
connect_opts.tcp.keepalive = config.keep_alive.or(Some(SERVER_DEFAULT_KEEPALIVE_TIMEOUT));
|
||||
|
||||
let mut accept_opts = AcceptOpts::default();
|
||||
accept_opts.ipv6_only = config.ipv6_only;
|
||||
let mut accept_opts = AcceptOpts {
|
||||
ipv6_only: config.ipv6_only,
|
||||
..Default::default()
|
||||
};
|
||||
accept_opts.tcp.send_buffer_size = config.inbound_send_buffer_size;
|
||||
accept_opts.tcp.recv_buffer_size = config.inbound_recv_buffer_size;
|
||||
accept_opts.tcp.nodelay = config.no_delay;
|
||||
|
||||
@@ -69,8 +69,10 @@ pub async fn run(config: Config) -> io::Result<()> {
|
||||
connect_opts.tcp.fastopen = config.fast_open;
|
||||
connect_opts.tcp.keepalive = config.keep_alive.or(Some(SERVER_DEFAULT_KEEPALIVE_TIMEOUT));
|
||||
|
||||
let mut accept_opts = AcceptOpts::default();
|
||||
accept_opts.ipv6_only = config.ipv6_only;
|
||||
let mut accept_opts = AcceptOpts {
|
||||
ipv6_only: config.ipv6_only,
|
||||
..Default::default()
|
||||
};
|
||||
accept_opts.tcp.send_buffer_size = config.inbound_send_buffer_size;
|
||||
accept_opts.tcp.recv_buffer_size = config.inbound_recv_buffer_size;
|
||||
accept_opts.tcp.nodelay = config.no_delay;
|
||||
|
||||
@@ -195,7 +195,7 @@ pub fn main(matches: &ArgMatches<'_>) {
|
||||
logging::init_with_file(path);
|
||||
}
|
||||
None => {
|
||||
logging::init_with_config("sslocal", &matches);
|
||||
logging::init_with_config("sslocal", matches);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ pub fn main(matches: &ArgMatches<'_>) {
|
||||
logging::init_with_file(path);
|
||||
}
|
||||
None => {
|
||||
logging::init_with_config("ssmanager", &matches);
|
||||
logging::init_with_config("ssmanager", matches);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ pub fn main(matches: &ArgMatches<'_>) {
|
||||
logging::init_with_file(path);
|
||||
}
|
||||
None => {
|
||||
logging::init_with_config("ssserver", &matches);
|
||||
logging::init_with_config("ssserver", matches);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user