Skip to content

Commit c695071

Browse files
committed
make clippy happy
1 parent c7b4ae4 commit c695071

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

crates/shadowsocks-service/src/local/net/udp/association.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ where
179179
respond_writer: W,
180180
) -> UdpAssociation<W> {
181181
let (assoc_handle, sender) =
182-
UdpAssociationContext::new(context, peer_addr, keepalive_tx, balancer, respond_writer);
182+
UdpAssociationContext::create(context, peer_addr, keepalive_tx, balancer, respond_writer);
183183
UdpAssociation {
184184
assoc_handle,
185185
sender,
@@ -223,7 +223,7 @@ impl<W> UdpAssociationContext<W>
223223
where
224224
W: UdpInboundWrite + Send + Sync + Unpin + 'static,
225225
{
226-
fn new(
226+
fn create(
227227
context: Arc<ServiceContext>,
228228
peer_addr: SocketAddr,
229229
keepalive_tx: mpsc::Sender<SocketAddr>,

crates/shadowsocks-service/src/local/tunnel/udprelay.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl UdpAssociation {
189189
balancer: PingBalancer,
190190
) -> UdpAssociation {
191191
let (assoc_handle, sender) =
192-
UdpAssociationContext::new(context, inbound, peer_addr, forward_addr, keepalive_tx, balancer);
192+
UdpAssociationContext::create(context, inbound, peer_addr, forward_addr, keepalive_tx, balancer);
193193
UdpAssociation { assoc_handle, sender }
194194
}
195195

@@ -219,7 +219,7 @@ impl Drop for UdpAssociationContext {
219219
}
220220

221221
impl UdpAssociationContext {
222-
fn new(
222+
fn create(
223223
context: Arc<ServiceContext>,
224224
inbound: Arc<UdpSocket>,
225225
peer_addr: SocketAddr,

crates/shadowsocks-service/src/server/udprelay.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl UdpAssociation {
176176
peer_addr: SocketAddr,
177177
keepalive_tx: mpsc::Sender<SocketAddr>,
178178
) -> UdpAssociation {
179-
let (assoc_handle, sender) = UdpAssociationContext::new(context, inbound, peer_addr, keepalive_tx);
179+
let (assoc_handle, sender) = UdpAssociationContext::create(context, inbound, peer_addr, keepalive_tx);
180180
UdpAssociation { assoc_handle, sender }
181181
}
182182

@@ -205,7 +205,7 @@ impl Drop for UdpAssociationContext {
205205
}
206206

207207
impl UdpAssociationContext {
208-
fn new(
208+
fn create(
209209
context: Arc<ServiceContext>,
210210
inbound: Arc<MonProxySocket>,
211211
peer_addr: SocketAddr,
@@ -304,7 +304,7 @@ impl UdpAssociationContext {
304304
data.len()
305305
);
306306

307-
if self.context.check_outbound_blocked(&target_addr).await {
307+
if self.context.check_outbound_blocked(target_addr).await {
308308
error!(
309309
"udp client {} outbound {} blocked by ACL rules",
310310
self.peer_addr, target_addr

0 commit comments

Comments
 (0)