Skip to content

Commit 79ad390

Browse files
authored
chore: clippy fix (#1849)
1 parent 64b6676 commit 79ad390

File tree

7 files changed

+11
-17
lines changed

7 files changed

+11
-17
lines changed

.github/workflows/build-and-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
RUST_LOG: "trace"
1212

1313
jobs:
14-
buid-test-check:
14+
build-test-check:
1515
strategy:
1616
matrix:
1717
platform:

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.74"
1+
msrv = "1.77"

crates/shadowsocks-service/src/local/redir/tcprelay/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mod sys;
3232
/// Established Client Transparent Proxy
3333
///
3434
/// This method must be called after handshaking with client (for example, socks5 handshaking)
35-
async fn establish_client_tcp_redir<'a>(
35+
async fn establish_client_tcp_redir(
3636
context: Arc<ServiceContext>,
3737
balancer: PingBalancer,
3838
mut stream: TcpStream,

crates/shadowsocks-service/src/local/tun/tcp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ impl TcpTun {
546546

547547
pub async fn drive_interface_state(&mut self, frame: &[u8]) {
548548
if self.iface_tx.send(frame.to_vec()).is_err() {
549-
panic!("interface send channel closed unexpectly");
549+
panic!("interface send channel closed unexpectedly");
550550
}
551551

552552
// Wake up and poll the interface.
@@ -565,7 +565,7 @@ impl TcpTun {
565565
/// Established Client Transparent Proxy
566566
///
567567
/// This method must be called after handshaking with client (for example, socks5 handshaking)
568-
async fn establish_client_tcp_redir<'a>(
568+
async fn establish_client_tcp_redir(
569569
context: Arc<ServiceContext>,
570570
balancer: PingBalancer,
571571
mut stream: TcpConnection,

src/service/local.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -939,10 +939,8 @@ pub fn create(matches: &ArgMatches) -> ShadowsocksResult<(Runtime, impl Future<O
939939
// DONE READING options
940940

941941
if config.local.is_empty() {
942-
return Err(ShadowsocksError::InsufficientParams(format!(
943-
"missing `local_address`, consider specifying it by --local-addr command line option, \
944-
or \"local_address\" and \"local_port\" in configuration file"
945-
)));
942+
return Err(ShadowsocksError::InsufficientParams("missing `local_address`, consider specifying it by --local-addr command line option, \
943+
or \"local_address\" and \"local_port\" in configuration file".to_string()));
946944
}
947945

948946
config

src/service/manager.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,8 @@ pub fn create(matches: &ArgMatches) -> ShadowsocksResult<(Runtime, impl Future<O
457457
// DONE reading options
458458

459459
config.manager.as_ref().ok_or_else(|| {
460-
ShadowsocksError::InsufficientParams(format!(
461-
"missing `manager_address`, consider specifying it by --manager-address command line option, \
462-
or \"manager_address\" and \"manager_port\" keys in configuration file"
463-
))
460+
ShadowsocksError::InsufficientParams("missing `manager_address`, consider specifying it by --manager-address command line option, \
461+
or \"manager_address\" and \"manager_port\" keys in configuration file".to_string())
464462
})?;
465463

466464
config

src/service/server.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,9 @@ pub fn create(matches: &ArgMatches) -> ShadowsocksResult<(Runtime, impl Future<O
481481
// DONE READING options
482482

483483
if config.server.is_empty() {
484-
return Err(ShadowsocksError::InsufficientParams(format!(
485-
"missing proxy servers, consider specifying it by \
484+
return Err(ShadowsocksError::InsufficientParams("missing proxy servers, consider specifying it by \
486485
--server-addr, --encrypt-method, --password command line option, \
487-
or configuration file, check more details in https://shadowsocks.org/doc/configs.html"
488-
)));
486+
or configuration file, check more details in https://shadowsocks.org/doc/configs.html".to_string()));
489487
}
490488

491489
config

0 commit comments

Comments
 (0)