Skip to content

Commit

Permalink
chore: clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronChen0 committed Jan 11, 2025
1 parent 64b6676 commit 3c1f4bf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
RUST_LOG: "trace"

jobs:
buid-test-check:
build-test-check:
strategy:
matrix:
platform:
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.74"
msrv = "1.77"
2 changes: 1 addition & 1 deletion crates/shadowsocks-service/src/local/redir/tcprelay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions crates/shadowsocks-service/src/local/tun/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions src/service/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/service/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/service/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c1f4bf

Please sign in to comment.