Skip to content

Commit c5c94db

Browse files
committed
Formatting
1 parent 843570b commit c5c94db

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

node/src/proxy_client/stream_handler_pool.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ impl StreamHandlerPoolReal {
114114
let inner_arc_1 = inner_arc.clone();
115115
let logger = Self::make_logger_copy(&inner_arc);
116116
let data_len = payload.sequenced_packet.data.len();
117-
let hostname = payload.target_hostname.as_ref().unwrap_or(&"<unknown>".to_string()).to_string();
117+
let hostname = payload
118+
.target_hostname
119+
.as_ref()
120+
.unwrap_or(&"<unknown>".to_string())
121+
.to_string();
118122
let target_port = payload.target_port;
119123
match Self::find_stream_with_key(&stream_key, &inner_arc) {
120124
Some(sender_wrapper) => {
@@ -245,7 +249,7 @@ impl StreamHandlerPoolReal {
245249
logger,
246250
"Queueing write of {} bytes{} to {} on stream {}",
247251
payload_size,
248-
if last_data {" (last data)"} else {""},
252+
if last_data { " (last data)" } else { "" },
249253
sender_wrapper.peer_addr(),
250254
stream_key,
251255
);
@@ -448,7 +452,8 @@ impl StreamHandlerPoolReal {
448452
logger,
449453
"Found IP addresses for {}: {:?}", target_hostname, &filtered_ip_addrs
450454
);
451-
let result = establisher.establish_stream(payload, filtered_ip_addrs, target_hostname.clone());
455+
let result =
456+
establisher.establish_stream(payload, filtered_ip_addrs, target_hostname.clone());
452457
match result {
453458
Ok(sender_wrapper) => {
454459
debug!(
@@ -458,7 +463,7 @@ impl StreamHandlerPoolReal {
458463
sender_wrapper.peer_addr()
459464
);
460465
Ok(sender_wrapper)
461-
},
466+
}
462467
Err(e) => {
463468
debug!(
464469
logger,

node/src/proxy_client/stream_writer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl StreamWriter {
9393
"Writing {} bytes from packet {}{} over existing stream",
9494
packet.data.len(),
9595
packet.sequence_number,
96-
if packet.last_data {" (last data)"} else {""}
96+
if packet.last_data { " (last data)" } else { "" }
9797
);
9898
match self.stream.poll_write(&packet.data) {
9999
Err(e) => {
@@ -103,7 +103,7 @@ impl StreamWriter {
103103
"Error writing {} bytes from packet {}{}: {}",
104104
packet.data.len(),
105105
packet.sequence_number,
106-
if packet.last_data {" (last data)"} else {""},
106+
if packet.last_data { " (last data)" } else { "" },
107107
e
108108
);
109109
return Err(());

node/src/sub_lib/route.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,7 @@ pub struct RouteSegment {
329329
impl Debug for RouteSegment {
330330
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
331331
let keys_base64: Vec<String> = self.keys.iter().map(|k| k.to_string()).collect();
332-
write!(
333-
f,
334-
"{} : {:?}",
335-
keys_base64.join(" -> "),
336-
self.recipient
337-
)
332+
write!(f, "{} : {:?}", keys_base64.join(" -> "), self.recipient)
338333
}
339334
}
340335

0 commit comments

Comments
 (0)