chore: clippy fix (#1849)

This commit is contained in:
Aaron Chen
2025-01-11 13:04:26 +08:00
committed by GitHub
parent 64b6676489
commit 79ad390653
7 changed files with 11 additions and 17 deletions

View File

@@ -11,7 +11,7 @@ env:
RUST_LOG: "trace"
jobs:
buid-test-check:
build-test-check:
strategy:
matrix:
platform:

View File

@@ -1 +1 @@
msrv = "1.74"
msrv = "1.77"

View File

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

View File

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

View File

@@ -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

View File

@@ -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

View File

@@ -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