chore: reformatted with nightlly rustc

This commit is contained in:
zonyitoo
2024-04-14 22:08:08 +08:00
parent 5a75db86d5
commit f8410cc329
6 changed files with 22 additions and 7 deletions
+8 -1
View File
@@ -70,7 +70,14 @@ use serde::{Deserialize, Serialize};
use shadowsocks::relay::socks5::Address;
use shadowsocks::{
config::{
ManagerAddr, Mode, ReplayAttackPolicy, ServerAddr, ServerConfig, ServerUser, ServerUserManager, ServerWeight,
ManagerAddr,
Mode,
ReplayAttackPolicy,
ServerAddr,
ServerConfig,
ServerUser,
ServerUserManager,
ServerWeight,
},
crypto::CipherKind,
plugin::PluginConfig,
@@ -6,7 +6,10 @@ use hickory_resolver::proto::{
op::{header::MessageType, response_code::ResponseCode, Message, OpCode},
rr::{
rdata::{A, AAAA},
DNSClass, RData, Record, RecordType,
DNSClass,
RData,
Record,
RecordType,
},
};
use log::{debug, trace};
@@ -35,8 +35,7 @@ use tokio::{
time,
};
use crate::config::ServerInstanceConfig;
use crate::local::context::ServiceContext;
use crate::{config::ServerInstanceConfig, local::context::ServiceContext};
use super::{
server_data::ServerIdent,
@@ -29,7 +29,9 @@ use shadowsocks::{
use crate::{
local::{context::ServiceContext, loadbalancing::PingBalancer},
net::{
packet_window::PacketWindowFilter, MonProxySocket, UDP_ASSOCIATION_KEEP_ALIVE_CHANNEL_SIZE,
packet_window::PacketWindowFilter,
MonProxySocket,
UDP_ASSOCIATION_KEEP_ALIVE_CHANNEL_SIZE,
UDP_ASSOCIATION_SEND_CHANNEL_SIZE,
},
};
@@ -14,7 +14,7 @@ use tokio::{
};
use crate::net::{
sys::{ErrorKind, set_common_sockopt_after_connect, set_common_sockopt_for_connect},
sys::{set_common_sockopt_after_connect, set_common_sockopt_for_connect, ErrorKind},
AcceptOpts,
AddrFamily,
ConnectOpts,
+5 -1
View File
@@ -991,7 +991,11 @@ fn launch_reload_server_task(config_path: PathBuf, balancer: PingBalancer) {
}
};
info!("auto-reload {} with {} servers", config_path.display(), config.server.len());
info!(
"auto-reload {} with {} servers",
config_path.display(),
config.server.len()
);
if let Err(err) = balancer.reset_servers(config.server).await {
error!("auto-reload {} but found error: {}", config_path.display(), err);