mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
chore: clippy fix (#1849)
This commit is contained in:
2
.github/workflows/build-and-test.yml
vendored
2
.github/workflows/build-and-test.yml
vendored
@@ -11,7 +11,7 @@ env:
|
||||
RUST_LOG: "trace"
|
||||
|
||||
jobs:
|
||||
buid-test-check:
|
||||
build-test-check:
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
|
||||
@@ -1 +1 @@
|
||||
msrv = "1.74"
|
||||
msrv = "1.77"
|
||||
|
||||
@@ -32,7 +32,7 @@ mod sys;
|
||||
/// Established Client Transparent Proxy
|
||||
///
|
||||
/// This method must be called after handshaking with client (for example, socks5 handshaking)
|
||||
async fn establish_client_tcp_redir<'a>(
|
||||
async fn establish_client_tcp_redir(
|
||||
context: Arc<ServiceContext>,
|
||||
balancer: PingBalancer,
|
||||
mut stream: TcpStream,
|
||||
|
||||
@@ -546,7 +546,7 @@ impl TcpTun {
|
||||
|
||||
pub async fn drive_interface_state(&mut self, frame: &[u8]) {
|
||||
if self.iface_tx.send(frame.to_vec()).is_err() {
|
||||
panic!("interface send channel closed unexpectly");
|
||||
panic!("interface send channel closed unexpectedly");
|
||||
}
|
||||
|
||||
// Wake up and poll the interface.
|
||||
@@ -565,7 +565,7 @@ impl TcpTun {
|
||||
/// Established Client Transparent Proxy
|
||||
///
|
||||
/// This method must be called after handshaking with client (for example, socks5 handshaking)
|
||||
async fn establish_client_tcp_redir<'a>(
|
||||
async fn establish_client_tcp_redir(
|
||||
context: Arc<ServiceContext>,
|
||||
balancer: PingBalancer,
|
||||
mut stream: TcpConnection,
|
||||
|
||||
@@ -939,10 +939,8 @@ pub fn create(matches: &ArgMatches) -> ShadowsocksResult<(Runtime, impl Future<O
|
||||
// DONE READING options
|
||||
|
||||
if config.local.is_empty() {
|
||||
return Err(ShadowsocksError::InsufficientParams(format!(
|
||||
"missing `local_address`, consider specifying it by --local-addr command line option, \
|
||||
or \"local_address\" and \"local_port\" in configuration file"
|
||||
)));
|
||||
return Err(ShadowsocksError::InsufficientParams("missing `local_address`, consider specifying it by --local-addr command line option, \
|
||||
or \"local_address\" and \"local_port\" in configuration file".to_string()));
|
||||
}
|
||||
|
||||
config
|
||||
|
||||
@@ -457,10 +457,8 @@ pub fn create(matches: &ArgMatches) -> ShadowsocksResult<(Runtime, impl Future<O
|
||||
// DONE reading options
|
||||
|
||||
config.manager.as_ref().ok_or_else(|| {
|
||||
ShadowsocksError::InsufficientParams(format!(
|
||||
"missing `manager_address`, consider specifying it by --manager-address command line option, \
|
||||
or \"manager_address\" and \"manager_port\" keys in configuration file"
|
||||
))
|
||||
ShadowsocksError::InsufficientParams("missing `manager_address`, consider specifying it by --manager-address command line option, \
|
||||
or \"manager_address\" and \"manager_port\" keys in configuration file".to_string())
|
||||
})?;
|
||||
|
||||
config
|
||||
|
||||
@@ -481,11 +481,9 @@ pub fn create(matches: &ArgMatches) -> ShadowsocksResult<(Runtime, impl Future<O
|
||||
// DONE READING options
|
||||
|
||||
if config.server.is_empty() {
|
||||
return Err(ShadowsocksError::InsufficientParams(format!(
|
||||
"missing proxy servers, consider specifying it by \
|
||||
return Err(ShadowsocksError::InsufficientParams("missing proxy servers, consider specifying it by \
|
||||
--server-addr, --encrypt-method, --password command line option, \
|
||||
or configuration file, check more details in https://shadowsocks.org/doc/configs.html"
|
||||
)));
|
||||
or configuration file, check more details in https://shadowsocks.org/doc/configs.html".to_string()));
|
||||
}
|
||||
|
||||
config
|
||||
|
||||
Reference in New Issue
Block a user