Skip to content

Commit adb7503

Browse files
committed
chore: cargo fmt
1 parent 949c149 commit adb7503

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

testnet/stacks-node/src/event_dispatcher.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ pub fn send_request(
394394
// ProtocolFamily messages from a Read, and write them to a Write. The Read + Write is
395395
// (usually) a non-blocking socket; the network connection deals with EWOULDBLOCK internally,
396396
// as well as underfull socket buffers.
397-
//
397+
//
398398
// Third, we need to _drive_ data to the socket. We have to repeatedly (1) flush the network
399399
// handle (which contains the buffered bytes from the message to be fed into the socket), and
400400
// (2) drive bytes from the handle into the socket iself via the network connection. This is a
@@ -450,9 +450,12 @@ pub fn send_request(
450450
if flushed && num_sent == 0 {
451451
break;
452452
}
453-
453+
454454
if Instant::now().saturating_duration_since(start) > timeout {
455-
return Err(io::Error::new(io::ErrorKind::WouldBlock, "Timed out while receiving request"));
455+
return Err(io::Error::new(
456+
io::ErrorKind::WouldBlock,
457+
"Timed out while receiving request",
458+
));
456459
}
457460
}
458461

@@ -497,7 +500,10 @@ pub fn send_request(
497500
request_handle = rh;
498501

499502
if Instant::now().saturating_duration_since(start) > timeout {
500-
return Err(io::Error::new(io::ErrorKind::WouldBlock, "Timed out while receiving request"));
503+
return Err(io::Error::new(
504+
io::ErrorKind::WouldBlock,
505+
"Timed out while receiving request",
506+
));
501507
}
502508
}
503509

@@ -1952,7 +1958,7 @@ mod test {
19521958
client_done_signal
19531959
.recv()
19541960
.expect("Failed to receive client done signal");
1955-
1961+
19561962
// Explicitly drop the stream after signaling to ensure the client finishes
19571963
// NOTE: this will cause the test to slow down, since `send_request` expects
19581964
// `Connection: close`

0 commit comments

Comments
 (0)